localreqop.blogg.se

Nvm change node version
Nvm change node version






nvm change node version

But remember to switch back to native architecture before installing versions >=v16, by using the command arch -arm64 zsh (or just close the terminal window and open a new one). The versions of node installed this way will run in emulated mode using Rosetta translator.Īfter this you can safely install any node version older than v16 using nvm. The trick here is to switch your terminal to i386 architecture, and if you’re using the default Zsh shell this can be done using the command arch -x86_64 zsh and then you can confirm the new architecture was activated by running arch command that should output i386. If you want to use node versions older than v16 that are not natively supported by arm64 architecture (this is the architecture used by Apple Silicon chips) the best option is to install these versions from pre-build binaries that are available but only for the more traditional i386 architecture. Running on Apple Silicon (M1, M1 Pro and M1 Max)

nvm change node version

With nvm installed we can pull any version of node we want with a simple command like: nvm install 14, or for installing the current LTS version: nvm install -lts.Īfter installing multiple versions of node we can set a default version using the alias command, like: nvm alias default 16. Installing different versions of node with nvm The easiest way to install nvm is to use curl or wget commands found here. Because I had them installed via Homebrew, it was as simple as running the following commands: The very popular tool that deals with different versions of node is called Node Version Manager (or nvm).īefore installing nvm we should remove all existing versions of node and also yarn if you use it. But getting our project to run with v16 showcased many of problems, and after spending 2-3 hours trying to upgrade libraries with installation errors, I gave up and shifted my focus into making the project run with the previous node LTS v14, while also being able to run the more recent projects with newer versions of node like v16 or even v17. 2021 and has native support for Apple silicon chips. It was not a very old project and on my M1 mac I already had installed node v16 which is the LTS version starting from Oct. I came across this issue while trying to run our website project built with React and Gatsby, started in the summer of 2020. As developers, we are often faced with the challenge of running different projects that have particular requirements regarding a specific version of node to be used.








Nvm change node version