当前位置: 首页 > 知识库问答 >
问题:

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

李飞翼
2023-03-14

在新的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

共有1个答案

戎志勇
2023-03-14

这似乎是我机器上的php版本的问题。在将php升级到7.1之后,这就不是问题了。

 类似资料: