Created
August 24, 2021 00:59
-
-
Save GZGavinZhao/08ab33e0e7c6aa05bad5214ce3b05595 to your computer and use it in GitHub Desktop.
Install nodejs on M1 Mac without sudo
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/sh | |
mkdir -p $HOME/SDK/ | |
curl -o node.tar.gz -L https://nodejs.org/dist/v16.7.0/node-v16.7.0-darwin-arm64.tar.gz | |
tar -xf node.tar.gz -C $HOME/SDK && rm -rf node.tar.gz | |
mv node-v16.7.0-darwin-arm64 node | |
echo "export PATH=$PATH:$HOME/SDK/node/bin" >> $HOME/.zshrc | |
source $HOME/.zshrc | |
node --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment