I currently have node.js version 0.8.8, and npm 1.1.59 installed.
Whenever I run:
$ npm install -g express
I get this in return:<
If you can't see nothing wrong with using sudo npm install -g package_name
. And have the problem with typing a password you can always add yourself to sudoers files or to the same group that npm
executable belongs to.
And so to add yourself to sudoers for npm edit /etc/sudoers
adding something like this to the bottom of the file:
your_username localhost=/usr/local/bin/npm
Here is step by step guide on how to achieve that if you need more details.
i got the same problem , This problem is caused because the .npm directory in your home directory was created with root privileges.
use :
$sudo npm install -g express