Home > database >  npm error whenever I try to install a package
npm error whenever I try to install a package

Time:12-05

I recently updated some npm packages and now it throws an error whenever I try to install a package with npm. I am new to npm and JS packages. Attatched is a image of the error. here is a image of the error message

CodePudding user response:

As suggested you can run npm install --save --legacy-peer-deps and see if it may resolve your problem.

If not you can remove your node-modules folder and your package-lock.json file and run a fresh npm install command.

Hope this works for you!

CodePudding user response:

Try this:

  1. Remove your node_modules folder (rm -rf node_modules)
  2. npm cache clean -f
  3. npm install --legacy-peer-deps
  • Related