NVM (Node Version Manager) is a helper tool for installing Node.
You may need to install xcode if you haven't before.
In your terminal, run xcode-select --install
You will need to make sure there is a .zshrc
file.
In your terminal, run touch ~/.zshrc
If you have a M1/M2/M3 Mac, and you encouter issues, you may need to try installing rosetta:
In your terminal, run softwareupdate --install-rosetta
Next, we need to install NVM. Run this command in your terminal:
touch ~/.zshrc && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
Then Restart your Terminal.
Now we can use nvm
to install node:
nvm install 22
To verify Node was installed, run:
node -v
You should see something like v22.0.0
(the exact numbers don't matter).
If your Mac is running the MacOS Monterey operating system (or later), you'll need to turn off "AirPlay Receiver" in the “Sharing” System Preference. This is necessary for you to run a web server using our default configuration (on port 5000
). More info here.
See
https://github.com/nvm-sh/nvm#troubleshooting-on-macos
and