Created
August 29, 2021 00:16
-
-
Save feliperodriguess/bafd591cc9d15898e63c22175a118743 to your computer and use it in GitHub Desktop.
install nvm on MacBook M1 chips
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
# Install the most recent version of node or one that is at least v15 | |
nvm install node | |
# Change to this new version | |
nvm use node | |
# Install Rosetta 2, if you haven't already | |
softwareupdate --install-rosetta | |
# Uninstall node v12 and v14, if you installed them before. | |
# Change the 'x's and 'y's to match the installed versions: | |
nvm uninstall 12.xx.x | |
nvm install 14.yy.y | |
# Open an x64 instance of zh: | |
arch -x86_64 zsh | |
# Install the desired Node versions and check if they are installed: | |
nvm install 12.xx.x | |
node -v | |
nvm install 14.yy.y | |
node -v | |
# Verify that you're still using an x64 shell: | |
node -p process.arch | |
# Exit the x64 instance: | |
exit | |
# Check that you-re back in an arm64 shell: | |
arch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment