Laravel 8 : npm 运行 开发错误未知选项 '--hide-modules'
Laravel 8 : npm run dev error Unknown option '--hide-modules'
我已尝试 运行 npm run dev
并遇到此错误:
我试过:
composer update
rm -rf node_modules
npm cache clean
npm install
npm outdated
npm install
npm run dev
但仍然没有用。有人可以帮助我吗?
请检查 laravel-混合版本和 package.json 文件中的脚本命令
对于 laravel-混合 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"
}
用于 laravel-混合 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"
},
好吧,看起来有些文件在您 运行 npm install
时损坏了
如果您对某些设置感到困惑,
我建议您重新构建新项目并 运行 npm install && npm run dev
我已尝试 运行 npm run dev
并遇到此错误:
我试过:
composer update
rm -rf node_modules
npm cache clean
npm install
npm outdated
npm install
npm run dev
但仍然没有用。有人可以帮助我吗?
请检查 laravel-混合版本和 package.json 文件中的脚本命令
对于 laravel-混合 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"
}
用于 laravel-混合 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"
},
好吧,看起来有些文件在您 运行 npm install
如果您对某些设置感到困惑,
我建议您重新构建新项目并 运行 npm install && npm run dev