Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Can't build assets (Metronic 8.2.0 Laravel)


Hi, when I try to build the assets I get an error.


TypeError: Class extends value #<Object> is not a constructor or null
at Object.<anonymous> (C:\xampp\htdocs\handyshops\node_modules\npm\node_modules\tar\lib\read-entry.js:91:4)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (C:\xampp\htdocs\handyshops\node_modules\npm\node_modules\tar\lib\pack.js:27:19)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)


How can I solve this problem? Thanks for your help.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (6)


The problem is the structure folder in new versions of @shopify/draggable. Block package.json to 1.0.1


How to resolve it? I my current project want to npm run dev it show same error, when I look into node_modules/@shopify/draggable/ , it have build, there is no lib folder.

I download the source code, and run again in new fresh folder, when I run npm install, it has the node_modules/@shopify/draggable/lib folder.

I checked the package.json and webpack.mix.js is identical. Totally no idea what's goes wrong, anyone can help?

I found the issue, please make sure you copy the package-lock.json, it had the records version for @shopify/draggable. which will included the lib folder, if you just npm install, it will have build version


U can install old version of @shopify/draggable, it will have lib folder



Hi Jeremy,

The error message you're encountering appears to be related to an issue in one of the dependencies used in the project. You can try the following steps:

Update Node.js and npm:
Ensure that you are using an up-to-date version of Node.js and npm. You can download the latest versions from the official Node.js website ( Suggested version is Node.js v18

Delete node_modules and package-lock.json:
Sometimes, dependencies can become corrupted. To resolve this, navigate to your project directory in the terminal and run the following commands:

rm -rf node_modules
rm package-lock.json

Afterward, re-install the project dependencies by running "yarn" or "npm install"

Update Dependencies:
Run "npm update" to update your project's dependencies to their latest compatible versions. This can help resolve compatibility issues.

Clear npm Cache:
Sometimes, npm's cache can cause issues. You can clear the npm cache by running:

npm cache clean -f


Thanks



Hi,

I had the same as Jeremy and your solution helped to fix it. Thanks for that!

But now I have another issue: I can't run

npm run dev


I get error:

[webpack-cli] [Error: ENOENT: no such file or directory, open "/Users/patryk/Sites/beautyflow/node_modules/@shopify/draggable/lib/draggable.bundle.js"] {
errno: -2,
code: "ENOENT",
syscall: "open",
path: "/Users/patryk/Sites/beautyflow/node_modules/@shopify/draggable/lib/draggable.bundle.js"
}


Can you help?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(