每次我在我的样板项目上运行npm install时,我都会收到这个错误:
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之后,得到以下结果:
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]https://stackoverflow.com/questions/51392241
复制相似问题