Install NVM
Create a ~/.zshrc file (if it doesn't exist)
touch ~/.zshrcBefore proceeding to the next step I needed to manually install Rosetta 2 in order run apps not built for Apple silicon.
softwareupdate --install-rosettaInstall NVM using curl (found on the NVM Readme)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashThis last command will update your
~/.zshrcfile to look like the following:export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completionVerify if NVM is installed. If it shows “nvm command not found”, then run the below command
source ~/.zshrc nvm list nvm -v
Verify & Install Node Using NVM [For specific version]
nvm run node --version
node -v
nvm install 16.13.0
node -vVerify & Install NPM Using NVM [For specific version]
npm -v
npm install -g npm@8.1.1
npm -vUninstall a Node Version
nvm uninstall 12
No comments:
Post a Comment