Installing From NodeJS NPM Fails

Do you like this?

This post shows you how to fix the problem failed to fetch from registry when running npm install. My OS was Ubuntu.


Probably your NodeJS is outdated. For my machine, it was like this:

[vagrant@dev]$ node --version
Fixing this is quite easy, following are the commands you should run.
sudo apt-get purge nodejs npm
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
For the latest version of nodejs, npm is embedded. Hence, you don't have to install it separately. Next

comments powered by Disqus