Last active
August 17, 2020 08:08
-
-
Save alertedsnake/7dd9b87e47b1246fab93 to your computer and use it in GitHub Desktop.
Use custom node + npm for Jenkins job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.