首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm错误!运行npm安装时的代码ELIFECYCLE

npm错误!运行npm安装时的代码ELIFECYCLE
EN

Stack Overflow用户
提问于 2018-07-18 09:24:44
回答 0查看 1.5K关注 0票数 1

每次我在我的样板项目上运行npm install时,我都会收到这个错误:

代码语言:javascript
复制
ERROR in multi react-color moment ag-grid ag-grid-react es6-promise react-dom-factories react-spinners sortablejs
Module not found: Error: Can't resolve 'react-spinners' in 'C:\Code\react-boilerplate'
 @ multi react-color moment ag-grid ag-grid-react es6-promise react-dom-factories react-spinners sortablejs vendor[6]

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @myapp/app@0.0.1 build: `webpack --config ./webpack.prod.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @myapp/app@0.0.1 build 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!     D:\Users\johndoe\AppData\Roaming\npm-cache\_logs\2018-07-18T01_29_52_633Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @myapp/app@0.0.1 prepare: `npm run build && npm run build:dev`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @myapp/app@0.0.1 prepare 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!     D:\Users\johndoe\AppData\Roaming\npm-cache\_logs\2018-07-18T01_29_52_874Z-debug.log

我该如何解决这个问题呢?

编辑:

在运行npm install -S react-spinners && npm install之后,得到以下结果:

代码语言:javascript
复制
ERROR in multi react-color moment ag-grid ag-grid-react es6-promise react-dom-factories react-spinners sortablejs
Module not found: Error: Can't resolve 'sortablejs' in 'C:\Code\react-boilerplate'
 @ multi react-color moment ag-grid ag-grid-react es6-promise react-dom-factories react-spinners sortablejs vendor[7]
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51392241

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档