

and pass the version number you want as the only param to $MY_NAME. If thenĮcho "Likely, you'll need to do what it suggests."Įcho "Likely, you'll need to run: $ brew update$CR"Įcho "To install latest node version, run the following command to get the latest version: $ nvm ls-remote"Įcho ". # purpose: To cleanly install NVM, NODE and NPMīACKUP_DIR=$HOME/backups/nvm-npm-bower-caches/$NOW Plus, I had to add a few settings to my startup script to make things work smoothly. If you have previously installed node using brew, then you will have a bunch of extra files that you should clean up before installing node "the right way". I'd use npm but you really should just follow the install instruction for each modules following the directions on there website as they will be more aware of any issue or bug they have than anyone else Since one of the core ideas behind Homebrew is that apps can be installed without giving them root access, this is a bad idea. You can read more on the topic in DanHerbert's post Fixing npm On Mac OS X for Homebrew Users, where he goes on to sayĪlso, using the Homebrew installation of npm will require you to use sudo when installing global packages. I've seen a few places suggested that you should use Homebrew to install Node (like alexpods answer and in this Team Treehouse blog Post) but installing this way you're more prone to run into issues as npm and brew are both package managers and you should have a package manager manage another package manager this leads to problems, like this bug offical npm issues Error: Refusing to delete: /usr/local/bin/npm or this Can't uninstall npm module on OSX You SHOULD NOT use brew to install node and npm. I'm super late to this but I didn't like the other answers Installing Homebrew Short variant of npm install some_module is npm i some_module.Some commands may require superuser privilege.Using bower: Install bower: npm install -g bowerĪnd then go to your project folder and install ngCordova in it: bower install -save ngCordova Using npm: Go to your project folder and install ng-cordova in it: npm install -save ng-cordova I don't know what variant is more fit for you, it depends on the package manager you want to use for the client side. What about ngCordova: you can install it using npm or bower. Using npm install ionic: npm install -g ionic Thanks to for pointing to the correct way (look at the comment bellow).

You may want to upgrade it to the latest version: $ npm install -g Previous version was npm update -g npm. Npm is shipping with node (or iojs), so it will be available after installing node (or iojs). Using nvm install node or iojs (you can install any version you want): nvm install 0.10 If you have trouble with installing nvm using brew you can install it manually (see here) profile run: echo "source $(brew -prefix nvm)/nvm.sh" > ~/.profile zshrc file to not run it again on every terminal start.
