Skip to content

Instantly share code, notes, and snippets.

@wmyers
Last active December 7, 2015 09:24
Show Gist options
  • Save wmyers/518db72a175b23b34305 to your computer and use it in GitHub Desktop.
Save wmyers/518db72a175b23b34305 to your computer and use it in GitHub Desktop.
NVM setup notes

Follow instructions from here: http://www.nearform.com/nodecrunch/nodejs-sudo-free/

You'll need to add the following to your ~/.profile

[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh  # This loads NVM

You can nvm use different versions of node in a shell, but you need to set a current version (nvm alias) to be automatically available in a new shell:

$ nvm alias default 4.1.1

But you need to start a new shell to see this working.

Remember npm bundles with node, so changing your node version will change your npm version (this will be displayed when you change node versions)

Remember to set nvm use in the shell, and then rebuild node_modules

Just before installing nvm (for iojs and new io/node combined), and nuking my global npm modules, here's what they were for node 0.12.4 projects

/usr/local/lib
├── babel-eslint@3.1.19
├── bower@1.3.8
├── eslint@0.24.0
├── express-generator@4.9.0
├── generator-angular@0.9.8
├── generator-angular-fullstack@2.0.13
├── generator-backbone@0.3.3
├── generator-backbone-mocha@0.1.1
├── generator-flux@0.4.1
├── generator-karma@0.8.3
├── generator-meteor@1.2.2
├── generator-mocha@0.1.6
├── generator-node@0.4.3
├── generator-webapp@0.5.0
├── grunt-cli@0.1.13
├── jsonfile@2.2.1
├── lodash@3.10.1
├── n@1.2.9
└── yo@1.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment