Last active
March 16, 2023 15:56
-
-
Save santisbon/b2daefc16e9078b22e84 to your computer and use it in GitHub Desktop.
Allows having different versions of #node in UNIX-based systems. If you just want to update node on OS X or Windows you can run the installer downloaded from the NodeJS site.
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
#!/bin/bash | |
sudo su | |
npm cache clean -f | |
# The n package is a Node helper | |
npm install -g n | |
# Instead of using "stable", you could specify a version: | |
# n 4.4.0 | |
n stable | |
# Create link to the latest nodejs installed binary file | |
ln -sf /usr/local/n/versions/node/5.8.0/bin/node /usr/local/bin/node | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment