npm run dev error
C:\xampp\htdocs\laravel\starterkit>npm run dev
> dev
> npm run development
> development
> mix
[webpack-cli] TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
at C:\xampp\htdocs\laravel\starterkit\webpack.mix.js:130:24
at Array.forEach (<anonymous>)
at Object.<anonymous> (C:\xampp\htdocs\laravel\starterkit\webpack.mix.js:129:107)
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:110:18)
at module.exports (C:\xampp\htdocs\laravel\starterkit\node_modules\laravel-mix\setup\webpack.config.js:11:5)
Replies (3)
i try this it worked :
edit your webpack.mix.js and change line code 130
from :
const [, folder] = file.match(/node_modules\/(.*?)\//);
to :
const folder = file.match(/node_modules\/(.*?)\//);
after that copy your
folder download "public/assets" to your folder server
Hi,
It might be related to the versions of npm, node and gulp-cli that you are using.
For your reference, these are the versions that we use in our environment:
npm version: 9.7.1
node version: v18.16.0
gulp CLI version: 2.3.0 You can check the version by running these commands:
npm -v
node -v
gulp -v If you have different versions, could you please try updating them and see if that solves the problem?
You can update npm by running this command:
npm install -g npm You can update gulp-cli by running this command:
npm install -g gulp-cli You can update node by downloading it from the node.js website. Please make sure to use version v18.16.x instead of v20.
Please let me know if this works for you or if you need any further assistance.
Thank you for your cooperation and patience.