NVM install node fails to install on macOS Big Sur M1 Chip
Oct 30, 2023
It wasn’t an issue while i was trying to install node 12.X.X but below that it was a big pain so i followed below steps and it worked for me
Uninstalled nvm if it’s already installed using Homebrew.
brew uninstall nvm
brew cleanup
Install Rosetta
softwareupdate --install-rosetta
Make terminal/iTerm2 to open in Rosetta mode
got to Application (-> utilities) -> right click on terminal app -> get Info -> Select “Open using Rosetta” -> Restart Terminal
In Terminal run a command
arch -x86_64 zsh
Make sure machine has .zshrc file if not just create one
cd ~
touch .zshrc
Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
Restart the terminal and check if nvm is installed successfully by running
nvm -v
Then install Node with nvm as usual
nvm install 10