1.Install nvm:
$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh
2.Use nvm to install node and npm. Reopen your terminal and run the following commands in turn:
$ nvm install 0.10.26
$ npm install -g yo
$ npm install -g generator-angular
yo
and generator-angular
will be installed in ~/.nvm/v0.10.26/lib/node_modules
. You can run them directly in the terminal now:
$ yo -v
3.Run which yo
to find the directory yo
is running from.