UPDATE (1/11/2015):
I now use NVM to manage my node/npm installation on both Linux and Unix. It's super simple; just follow these steps.
Install NVM.
$ curl https://raw.githubusercontent.com/creationix/nvm/v0.22.1/install.sh | bash
Use NVM to install the latest stable version of node and NPM.
$ nvm install stable
Tell NVM to use the stable version as the default version in future bash instances.
$ nvm alias default stable
Now you're all set with node & NPM. NVM even gets rid of the permissions issues with NPM global modules on Ubuntu, which normally requires you to chown
or sudo
and causes all sorts of frustration. You can use NVM to install different versions of node/NPM side by side as well. You can switch between installed versions with nvm use {version}
, as long as you've done nvm install {version}
already.
I think you may be running a really old version of node & npm. I see that node is v0.6.8 and npm is 1.1.0-2 when the current versions are 0.10.26 & 1.4.6 respectively. I'd try upgrading your node and npm installs and then try installing modules again and see if that fixes it for you.
Head over to http://nodejs.org and click the big green button in order to get the node installer. It will install both node & npm together.
Note: It's sometimes better not to install node/npm from a package manager unless you're confident the version listed in the package manager is the latest version. It's important to keep npm up to date. Npm even updates itself along with all your global node modules when you run npm update -g
.