0👍
✅
First I added these two values to ~/.npmrc
:
timeout=60000
prefer-offline=true
then I have used the following command with deleting the node_modules
folder:
npm cache clear --force
Then I added .npmignore
to the root of my project
After that, I used
npm config set registry http://registry.npmjs.org/
but when I installed it with npm I checked as root like so :
sudo npm update
and it worked!
Source:stackexchange.com