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)
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
npm cache clean -f
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
[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"
}
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