简体   繁体   English

在新的laravel 5.4安装中运行npm run dev会导致错误

[英]running npm run dev results in error in new laravel 5.4 installation

Running npm run dev on a new laravel 5.4 installation results in the following error. 在新的laravel 5.4安装上运行npm run dev导致以下错误。 Need help to figure out how to get past it. 需要帮助找出如何克服它。

> @ 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

It appears to be an issue with the php version on my machine. 我的机器上的php版本似乎有问题。 This is not an issue after upgrading php to 7.1. 将php升级到7.1后,这不是问题。

I had the similar problem . 我有类似的问题。 npm update fix my issue. npm update解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM