I have tried to run npm run dev
and got this error:
I've tried:
composer update
rm -rf node_modules
npm cache clean
npm install
npm outdated
npm install
npm run dev
and still didn't work. Can someone help me?
I have tried to run npm run dev
and got this error:
I've tried:
composer update
rm -rf node_modules
npm cache clean
npm install
npm outdated
npm install
npm run dev
and still didn't work. Can someone help me?
Please check laravel-mix version and scripts commands in package.json file
for laravel-mix 5.*.*
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js"
}
for laravel-mix 6.*.*
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
Well, it looks like some files got corrupt when you run npm install
so I f you confused about some settings,
I suggest you to build new project and run again npm install && npm run dev