错误:在Function.Module._resolveFilename找不到模块'webpack/lib/removeAndDo'(模块.js:470:15)



每当我尝试执行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:CHUBBSourcecode_claimyno_svndenuncia-claimysrcmainwebappjsappReactnode_modulesextract-text-webpack-pluginExtractedModule.js:30:42)*

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

你必须清理 npm 缓存:

$ rm -rf node_modules/
$ npm cache clean --force
$ npm i

试试:

npm install -g @angular/cli@latest

最新更新