Skip to content

Instantly share code, notes, and snippets.

@alertedsnake
Last active August 17, 2020 08:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alertedsnake/7dd9b87e47b1246fab93 to your computer and use it in GitHub Desktop.
Save alertedsnake/7dd9b87e47b1246fab93 to your computer and use it in GitHub Desktop.
Use custom node + npm for Jenkins job
# setup python virtualenv and install nodeenv
virtualenv .python
. .python/bin/activate
pip install nodeenv
# setup nodeenv with the node of your choice, and upgrade npm to latest
nodeenv --node=0.10.37 --prebuilt .node
. .node/bin/activate
npm install -g npm
@alertedsnake
Copy link
Author

If you want to go back to another version of node, run 'deactivate' in your shell.

To install a different version, run lines 3+ again, but on line 7 you replace the node version and replace '.node' with a new directory on lines 7 and 8.

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