Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (6)


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 (https://nodejs.org/). 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?



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


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(