Skip to content

Instantly share code, notes, and snippets.

@GZGavinZhao
Created August 24, 2021 00:59
Show Gist options
  • Save GZGavinZhao/08ab33e0e7c6aa05bad5214ce3b05595 to your computer and use it in GitHub Desktop.
Save GZGavinZhao/08ab33e0e7c6aa05bad5214ce3b05595 to your computer and use it in GitHub Desktop.
Install nodejs on M1 Mac without sudo
#!/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