Laravel 使用 NPM 遇到的问题
执行npm run dev
然后终端显示
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/.npm/_logs/2017-11-01T04_55_22_659Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: npm run development
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/.npm/_logs/2017-11-01T04_55_22_686Z-debug.log
一直找不到原因!!
老哥 解决了吗
删除 项目中 node_modules 目录 试一下看看。
要先安装laravel-mix:
npm install
or
npm install --no-bin-links
参考:
https://laravelacademy.org/post/6798.html