I'm trying to update my version of node to the latest stable.
Using this resource I was able to:
sudo npm install n -g
But when I try
sudo npm n stable
I get:
sudo: n: command not found
If I run n stable, the command is present:
n stable
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
install : node-v0.12.2
mkdir : /usr/local/n/versions/node/0.12.2
mkdir: cannot create directory ‘/usr/local/n’: Permission denied
Error: sudo required
ls /usr/local/bin/n– 0x2b3bfa0 Apr 13 '15 at 08:41sudo npm install n -gwill installnglobally, because it has the-gparameter (at least on my computer) – 0x2b3bfa0 Apr 13 '15 at 08:46cat ~/.npmrc | grep prefix– 0x2b3bfa0 Apr 13 '15 at 12:07sudo visudoand revert the changes made tosecure_pathvariable. Hope it helps. – 0x2b3bfa0 Apr 14 '15 at 19:18