Installing Yeoman on my OSX machine results in the following error:
paulh16$ npm install -g yo
npm http GET https://registry.npmjs.org/yo
npm http 304 https:
This worked well for me:
sudo npm install -g yo
For me on Ubuntu only the following worked for me...
Tested on Ubuntu 14.04.2
This was a base install of Ubuntu 14.04.2 on VirtualBox using ubuntu-trusty-64.
I had just installed node and npm fresh and they were working well.
npm install -y -g yo
echo export PATH="$HOME/npm/bin:$PATH" >> ~/.bashrc
npm config set prefix ~/npm
echo "export NODE_PATH=$NODE_PATH:/home/$USER/npm/lib/node_modules" >> ~/.bashrc && source ~/.bashrc
npm install -y -g yo
yes I had to install yeoman, fix the path issues, then reinstall yeoman. based on some answers on this stack overflow post
try
sudo chown -R $USER /usr/local
and this kind of problem would be solved forever
it's not encouraged to npm with sudo
The npm
command fails because you need to be root to edit files under /usr/
.
You should properly configure npm
, see this relevant SO answer:
$ echo prefix = ~/.node >> ~/.npmrc
This solved the issue for me. Setting the permission on the npm folder in your home directory was the fix for me.
sudo chown -R `whoami` ~/.npm