Skip to content

Instantly share code, notes, and snippets.

@saxenap
Last active April 3, 2020 01:36
Show Gist options
  • Save saxenap/edf4bb741cc1e20ea0ea1de8cbb639d3 to your computer and use it in GitHub Desktop.
Save saxenap/edf4bb741cc1e20ea0ea1de8cbb639d3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# rm -rf node_installation && wget -O node_installation https://gist.githubusercontent.com/saxenap/edf4bb741cc1e20ea0ea1de8cbb639d3/raw/ && chmod 777 node_installation && ./node_installation
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
# https://stackoverflow.com/a/29903645
n=$(which node); \
n=${n%/bin/node}; \
chmod -R 755 $n/bin/*; \
sudo cp -r $n/{bin,lib,share} /usr/local
node -e "console.log('Running Node.js ' + process.version)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment