NPM run dev 命令出现 node_modules/webpack/bin/webpack.js: not found 错误,yarn install 安装不上??
vagrant@homestead:~/Code/sample$ npm run dev
sample@1.0.0 dev /home/vagrant/Code/sample
npm run developmentsample@1.0.0 development /home/vagrant/Code/sample
NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
sh: 1: node_modules/webpack/bin/webpack.js: not found
npm ERR! Linux 4.4.0-81-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "development"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! sample@1.0.0 development: NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the sample@1.0.0 development script 'NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sample package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sample
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sample
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! Please include the following file with any support request:
npm ERR! /home/vagrant/Code/sample/npm-debug.log
npm ERR! Linux 4.4.0-81-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
npm ERR! node v6.11.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! sample@1.0.0 dev: npm run development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sample@1.0.0 dev script 'npm run development'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sample package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run development
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sample
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls sample
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! Please include the following file with any support request:
npm ERR! /home/vagrant/Code/sample/npm-debug.log
vagrant@homestead:~/Code/sample$
分享:新手怎么解决 NPM run dev 报错的问题,综合回答一下,希望能帮到后... 这个应该能解决很多人的问题