Home > database >  Can't install NPM
Can't install NPM

Time:11-23

Image of my terminal in VSCode

I've tried uninstalling/reinstalling node and clearing the cache but I can't seem to figure it out. Any ideas?

I'm on Windows 10 if that helps

CodePudding user response:

Try these:

  • Delete node_modules folder if you have one.
  • Delete package.lock.json. Then...

sudo apt update

sudo apt upgrade

sudo apt install nodejs

npm install

It seems that it's conflicting with chokidar.

CodePudding user response:

First of all you need to delete node_modules and package-lock.json not package.json

and then add cmd

npm install --force

if you are using Ubuntu OS use

sudo npm install

CodePudding user response:

I had a similar issue before and I believe it has to do with your nodejs. I suggest you reinstall your node cause it might solve the issue.

Try purging it

sudo apt-get purge nodejs

Then remove dependencies

sudo apt-get autoremove

Then reinstall

sudo apt install nodejs

Also try updating your chokidar and axios to a newer version, yours is already depreciated.

  • Related