3

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.

4
  • make sure to only have one webpack version installed Commented Sep 6, 2018 at 5:56
  • actually i performed another web pack installation earlier from that the problem persist how can i remove another webpack Commented Sep 6, 2018 at 6:05
  • I have posted an answer try that Commented Sep 6, 2018 at 6:14
  • I fixed this issue with: This answer Commented Mar 7, 2019 at 16:05

2 Answers 2

2

You have to cleaned npm cache:

$ rm -rf node_modules/
$ npm cache clean --force
$ npm i
Sign up to request clarification or add additional context in comments.

1 Comment

Did not solve for me, still running in to same error.
2

try it:

npm install -g @angular/cli@latest

1 Comment

Instead of saying try it please explain why do you think this will solve OP's problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.