I had this issue with npm v1.1.4
(and node v0.6.12
), which are the Ubuntu 12.04
repository versions.
It looks like that version of npm
isn’t supported any more, updating node (and npm with it) resolved the issue.
First, uninstall the outdated version (optional, but I think this fixed an issue I was having with global modules not being pathed in).
sudo apt-get purge nodejs npm
Then enable nodesource’s repo and install:
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
Note – the previous advice was to use Chris Lea’s repo, he’s now migrated that to nodesource, see:
- https://chrislea.com/2014/07/09/joining-forces-nodesource/
- https://nodesource.com/blog/chris-lea-joins-forces-with-nodesource
From: here