It is easier to use nvm for node installation. It allows you to quickly install and use different versions of node via the command line
It is available on Linux/Mac and Windows
You can find the setup file in the releases section and install it
To install node v14 you just need to execute 2 comands
nvm install 14
nvm use 14
Answer from David on Stack OverflowVideos
It is easier to use nvm for node installation. It allows you to quickly install and use different versions of node via the command line
It is available on Linux/Mac and Windows
You can find the setup file in the releases section and install it
To install node v14 you just need to execute 2 comands
nvm install 14
nvm use 14
If you've downloaded the exe, there's no installation needed - you already have the executable, and as you can see, it's operational - when you run it, you get Node.js' REPL.
If you want to "properly" install Node.js you could download and run the MSI from the link instead of the exe.
» npm install node
The approved answer didn't work for me. I had to switch the arch to x86 and then install and set the active node version.
arch -x86_64 zsh
nvm install 14
nvm use 14
That works for me.
For M2 chip
To clarify, when installing Node.js, it attempts to download the darwin arm64 version, which is only available from Node.js 16 onwards. If you're using an M1/M2 Mac, you'll need to use a Rosetta shell to install Node.js versions earlier than 16.
Here's how you can launch the Terminal using Rosetta:
- Navigate to the Applications folder in Finder.
- Use the Search icon to find and type "Terminal."
- Right-click on the Terminal icon that appears and choose "Get Info."
- In the Get Info window, tick the box labeled "Open using Rosetta."
- Close any currently open Terminal windows and exit the application. Then, reopen the Terminal.
- After following these steps, you should be able to install Node versions earlier than 16 using NVM, and the installation should be successful.
After reopening the terminal(Rosetta), this command should work.
nvm install 14.21.3
For more info: https://github.com/nvm-sh/nvm/issues/2944