$ lsb_release -a 2> /dev/null | grep Desc
Description: Ubuntu 14.04.1 LTS
$ sudo apt-get install build-essential
$ sudo add-apt-repository ppa:chris-lea/node.js && sudo apt-get update
$ sudo apt-get install nodejs && sudo npm update -g npm
$ sudo npm install -g yo generator-angular && cd /tmp && mkdir b && cd $_
/tmp/b $ yo angular
[?] Would you like to use Sass (with Compass)? No
[?] Would you like to include Bootstrap? No
[?] Which modules would you like to include?
⬢ angular-animate.js
⬢ angular-cookies.js
⬡ angular-resource.js
⬡ angular-route.js
⬢ angular-sanitize.js
⬢ angular-touch.js
Is there some trick—short of chowning /usr/lib/node_modules—that will stop these errors from occuring?
(feel free to use a path other than $HOME/npm)
npm from global node_modules folder (/usr/lib/node_modules)$ mkdir "$HOME/npm" $ npm config set prefix "$HOME/npm"$ printf "NODE_PATH=$NODE_PATH:$HOME/npm/lib/node_modules\nPATH=$PATH:$HOME/npm:$HOME/npm/bin\n" >> ~/.bashrc && source ~/.bashrc