How can resolve the NPM issue? Stuck with npm start error

Viewed 114

The issue I have is that npm start cannot start. I tried to fix with audit, deleted node_dependency directory and re-installed with npm, nothing works.

One concrete issue I see is:

The react-scripts package provided by Create React App requires a dependency:
  "webpack": "4.44.2"

Yet, I also see npm -v webpack -> 6.14.14. How do I need to debug this?

2 Answers

Your npm -v webpack command is not correct. it will return npm version and not the webpack version.

Try npm ls webpack . you can also check your package.json file for the packages you have. or run npm ls for the full list.

make sure to install the required dependency as it states.

Eventually I could not solve the package problem with an informed debugging.

What I did was to (npm install --global yarn) and start the application through it (yarn start). It worked a lot to download the packages and eventually started the application.

So, I guess I need to switch to yarn after this point, which is ok, as long as it works :)

Related