3

每当我尝试执行npm install以构建我react在项目中的一部分时。它抛出以下错误:

*module.js:472
    throw err;
    ^
Error: Cannot find module 'webpack/lib/removeAndDo'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\CHUBB\Sourcecode_claimyno_svn\denuncia-claimy\src\main\webapp\js\appReact\node_modules\extract-text-webpack-plugin\ExtractedModule.js:30:42)*

我的反应部分有什么问题,可能的解决方案是什么。

4

2 回答 2

2

试试看:

npm install -g @angular/cli@latest
于 2019-06-09T04:37:25.140 回答
2

你必须清理 npm 缓存:

$ rm -rf node_modules/
$ npm cache clean --force
$ npm i
于 2018-09-06T06:14:28.873 回答