Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Cannot find module 'webpack/lib/removeAndDo' at Function.Module._resolveFilename (module.js:470:15)

When ever I try to perform npm install to build my react part in project. it throws the error below:

*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)*

What is the issue with my react part and what could be a possible solution.

like image 932
Rschary Avatar asked Jul 20 '26 16:07

Rschary


2 Answers

You have to cleaned npm cache:

$ rm -rf node_modules/
$ npm cache clean --force
$ npm i
like image 144
Praveen Rao Chavan.G Avatar answered Jul 23 '26 08:07

Praveen Rao Chavan.G


try it:

npm install -g @angular/cli@latest
like image 33
LuDiaz Avatar answered Jul 23 '26 07:07

LuDiaz