在新的laravel 5.4安装上运行npm run dev
会导致以下错误。需要帮助来弄清楚如何克服它。
> @ dev /Users/rjacobsen/development/private/projects/laravel-54 > npm run development > @ development /Users/rjacobsen/development/private/projects/laravel-54 > cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js 95% emitting ERROR Failed to compile with 2 errors 8:59:48 AM These dependencies were not found: * /Users/rjacobsen/development/private/projects/laravel-54/resources/assets/js/app.js in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss * /Users/rjacobsen/development/private/projects/laravel-54/resources/assets/sass/app.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss To install them, you can run: npm install --save /Users/rjacobsen/development/private/projects/laravel-54/resources/assets/js/app.js /Users/rjacobsen/development/private/projects/laravel-54/resources/assets/sass/app. Asset Size Chunks Chunk Names /js/app.js 2.99 kB 0 [emitted] /js/app mix-manifest.json 32 bytes [emitted] npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! @ development: `cross-env 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 2 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/rjacobsen/.npm/_logs/2017-07-13T12_59_49_172Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! @ dev: `npm run development` npm ERR! Exit status 2 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/rjacobsen/.npm/_logs/2017-07-13T12_59_49_202Z-debug.log
答案 0 :(得分:0)
这似乎是我的机器上的PHP版本的问题。将php升级到7.1后,这不是问题。
答案 1 :(得分:0)
我有类似的问题。 npm update
解决我的问题。