You’ve probably been there. You download the official installer from the Node.js website, click "Next" a few times, and suddenly your global packages are throwing permission errors or your legacy project refuses to run because it needs an older version of the runtime. It’s a mess. Honestly, the biggest mistake most beginners make is treating Node like a standard desktop application. It isn't. It’s an environment, and environments change. That is exactly why you need to install node with nvm (Node Version Manager) instead of using those shiny download buttons on the homepage.
NVM acts as a middleman. Instead of hard-coding one version of Node into your system's root directories, it tucks different versions away in your user folder. You want to test the new features in Node 22 but your day job requires Node 18? No problem. You just swap them. It takes about three seconds.
Why the standard installer is kinda garbage for developers
Most people start with the "Recommended for Most Users" (LTS) version. It works for a week. Then, you find a cool open-source project on GitHub, try to run npm install, and the whole thing explodes because the project uses a specific experimental feature from a newer version. If you used the standard installer, you'd have to uninstall your current version and reinstall the new one. And then repeat that process every time you switch projects. It's a nightmare.
System-level installations often require sudo on macOS or Linux to install global packages. If you find yourself typing sudo npm install -g, stop. You're basically giving a random package from the internet administrative access to your core files. By choosing to install node with nvm, you avoid this entirely. Everything lives in your home directory, so permissions are never an issue.
The real power of the .nvmrc file
There is this little trick that most senior devs use but rarely talk about to juniors: the .nvmrc file. You drop a plain text file into your project root with a version number like v20.10.0. When a teammate clones your repo, they just run nvm use and their terminal automatically switches to the correct version. No guessing. No "well, it works on my machine" excuses.
Getting NVM on your machine the right way
Installing NVM itself is the only tricky part, mostly because it involves the command line. If you’re on macOS or Linux, you’re basically going to use a curl or wget command. Don't use Homebrew for this. I know, everyone loves Homebrew, but the NVM maintainers themselves explicitly state that Homebrew installations are not supported and often lead to weird shell path issues.
To get started, you’ll grab the install script from the official GitHub repository. Currently, the most stable way is to run:
📖 Related: SAE Tools Explained: Why You Still Need Those Fractions in Your Toolbox
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
Once that finishes, you aren't actually done. You have to "refresh" your shell so it recognizes the new nvm command. You can either close and reopen your terminal, or "source" your profile. If you're on a Mac using Zsh (which is the default), you’d run source ~/.zshrc.
Windows is a different story
If you are on Windows, the standard NVM script won't work. You need nvm-windows, which is a separate project by Corey Butler. It’s a proper .exe installer that does the heavy lifting for you. It’s remarkably stable. The core logic is the same: it intercepts the "node" command and points it to whichever version you've currently selected.
How to actually install node with nvm once you're set up
Once the manager is living on your system, the world is your oyster. To install node with nvm, you just tell it what you want.
✨ Don't miss: Why Your Sony Radio and CD Player Still Rocks in a Streaming World
nvm install node— This grabs the absolute latest version.nvm install --lts— This gets the Long Term Support version, which is what you want for production apps.nvm install 16.20.0— This gets a very specific old version for that legacy project you're scared to touch.
After installing, you have to tell your computer to use it. Running nvm use 20 will switch your current terminal session to Node 20. If you want a specific version to be your "forever" default every time you open a new tab, use nvm alias default 20.
Troubleshooting the "Command Not Found" headache
The most common issue I see is people running the install script and then immediately typing node -v only to see "command not found." This almost always means the NVM configuration lines didn't get added to your shell profile automatically. You’ll need to manually open your .bashrc, .bash_profile, or .zshrc and make sure the export paths are there. It looks like a bunch of gibberish about NVM_DIR, but it’s essential for the system to know where the binaries are hiding.
Real-world scenario: The version conflict
Imagine you're working on a freelance gig for a client whose site was built in 2019. It needs Node 12. At the same time, you're building a side project with the latest Next.js features that require Node 18+. Without NVM, you'd be spending half your day downloading installers. With it, you just keep two terminal tabs open. Tab A runs Node 12; Tab B runs Node 18. They don't see each other. They don't fight. It's peace.
📖 Related: Thinking About How to Make Coffee Machine Projects at Home? Read This First
Performance and overhead
People ask if NVM slows down their machine. Not really. It adds a tiny bit of time to your shell startup because it has to look up the paths, but we're talking milliseconds. It’s a negligible price to pay for the sanity it provides.
Actionable Next Steps
If you currently have Node installed via the official website installer, your first step is to uninstall it completely. On a Mac, this involves deleting files in /usr/local/lib and /usr/local/include. On Windows, use "Add or Remove Programs."
Once your system is "clean," follow these steps:
- Install NVM using the curl script (macOS/Linux) or the nvm-windows installer.
- Verify the installation by typing
nvm --version. If it prints a number, you're golden. - Install the LTS version of Node by running
nvm install --lts. - Set your default version so you don't have to switch every time:
nvm alias default [version number]. - Create an .nvmrc file in your main project folder. Just type
node -v > .nvmrc. Now your project "remembers" which version it needs.
Stop fighting with your environment. Node development is hard enough without the tools getting in your way. Using a version manager isn't just a "pro tip"—it's the baseline for any serious workflow in 2026.