I\'m trying to upgrade to the latest version of node. I\'m following the instructions at http://davidwalsh.name/upgrade-nodejs
But when I do:
sudo np
My solution is:
sudo -E env "PATH=$PATH" n stable
Works fine for me.
Found it here: https://stackoverflow.com/a/29400598/861615
This happens because you have change default global packages directory