Skip to content

Instantly share code, notes, and snippets.

@RyanCCollins
Created September 29, 2016 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save RyanCCollins/1a5686ff9dd51b72eb2d4dc70aa6c1f4 to your computer and use it in GitHub Desktop.
Save RyanCCollins/1a5686ff9dd51b72eb2d4dc70aa6c1f4 to your computer and use it in GitHub Desktop.

Node configuration.

Update NPM version with the following command

npm update -g npm

Download NVM (Node Version Manager), which will help you to use the correct version of NodeJS

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash

In order to activate the NVM install, run the following command:

. ~/.nvm/nvm.sh

To use the project specific NodeJS version, you need to have nvm installed and then run the following from the root directory of our project.

nvm install && nvm use

If you get permission errors, try this, which will correct permission errors:

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
@martin-martin
Copy link

Piecing things together (for anyone interested):
nvm install && nvm use (run from the appropriate root folder) automatically detects and set the correct NodeJS version from the package.json file (seen here).

Otherwise you can use these commands to set the version used for the alumni webapp:

nvm install 5.2.0
nvm use 5.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment