🌐
npm
docs.npmjs.com › downloading-and-installing-node-js-and-npm
Downloading and installing Node.js and npm | npm Docs
To publish and install packages to and from the public npm registry or a private npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. We strongly recommend using a Node version manager like nvm to install Node.js and npm.
Discussions

What is the recommended way to install Node.js, nvm and npm on MacOS X? - Stack Overflow
I am trying to use Homebrew as much as possible. What's the recommended way to install Node.js, nvm and npm on MacOS X? More on stackoverflow.com
🌐 stackoverflow.com
Nvm or homebrew for Node install
I use homebrew to install nvm then install node via nvm ¯\(ツ)/¯ More on reddit.com
🌐 r/webdev
34
19
April 12, 2023
How should I install Node JS?
Install nvm. Live it. Learn it. Love it. More on reddit.com
🌐 r/node
24
0
December 20, 2024
How to Install Node.js and NPM on Ubuntu 24.04?
Install specific Node.js versions with nvm install 16 and switch versions with nvm use 16. For a detailed guide, check out our blog here. Have questions? Drop them below! Share ... Nobody's responded to this post yet. Add your thoughts and get the conversation going. ... .NET Community, if you are using C#, VB.NET, F#, or anything running with .NET... you are at the right place! ... Discussion about npm... More on reddit.com
🌐 r/Hostman_com
1
August 14, 2024
🌐
Latenode
community.latenode.com › other questions › npm
Why isn't NPM installed when I use NVM to download Node? - NPM - Latenode Official Community
April 18, 2025 - Help! NVM isn’t installing NPM with Node I’m having trouble with NVM (Node Version Manager). It downloads Node just fine, but NPM is missing. Has anyone else run into this? Here’s what I’ve tried so far: Checked NVM v…
🌐
DEV Community
dev.to › ms314006 › how-to-install-npm-through-nvm-node-version-manager-5gif
How to install npm through NVM(Node version manager)? - DEV Community
August 2, 2020 - The first way is node installer which I always did when I want to install npm before, because this way is easily, you just need to go to the website of node, download the node installer and install it(Whatever you choose the LTS or Current version), you will got npm when you finished. The second way is through NVM, also is main way I want to share in this post.
🌐
GitHub
github.com › nvm-sh › nvm
GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
This will first use "nvm version node" to identify the current version you're migrating packages from. Then it resolves the new version to install from the remote server and installs it.
Starred by 90.3K users
Forked by 9.7K users
Languages   Shell 98.0% | Makefile 1.2%
🌐
DreamHost
help.dreamhost.com › hc › en-us › articles › 360029083351-Installing-a-custom-version-of-NVM-and-Node-js
Installing a custom version of NVM and Node.js – DreamHost Knowledge Base
[server]$ setfattr -n user.pax.flags -v "mr" $(find $NVM_DIR -type f -iname "node" -o -iname "npm" -o -iname "npx") This will need to be done each time a new version is installed.
Find elsewhere
🌐
Google Groups
groups.google.com › g › nodejs › c › A9ku09F39-k
nvm and npm global installs
... Either email addresses are ... globally. It safer to just declare your dependencies in your app's package.json and install them locally using `npm install`. This prevents a world of headache with version mismatches....
🌐
SitePoint
sitepoint.com › blog › javascript › installing multiple versions of node.js using nvm
Installing Multiple Versions of Node.js Using nvm — SitePoint
March 3, 2025 - Fortunately, when installing a new Node.js version, you can reinstall the npm global packages from a specific version. For example: nvm install v12.14.1 --reinstall-packages-from=10.18.1
🌐
Refine
refine.dev › blog › install-nvm-mac-and-windows
How to Install and Use NVM? | Refine
July 5, 2024 - # Update NVM to the latest version nvm install-latest-npm # Install the latest Node version nvm install node # Update existing Node versions and reinstall global packages nvm install 14.18.1 --reinstall-packages-from=14.17.0
🌐
npm
npmjs.com › package › nvm
nvm - npm
August 2, 2016 - Migrate to trusted publishing or granular access tokens to avoid disruption. Learn more.× ... Author message:This is NOT the correct nvm. Visit https://nvm.sh and use the curl command to install it.
      » npm install nvm
    
Published   Aug 02, 2016
Version   0.0.4
Author   Jordan Harband
🌐
Linode
linode.com › docs › guides › how-to-install-use-node-version-manager-nvm
How to Install and Use NVM (Node Version Manager) | Linode Docs
November 29, 2023 - NVM_DIR: NVM’s installation directory. NVM_BIN: The location where Node, the Node Package Manager (NPM), and global packages for the active version of Node are installed.
🌐
Chris Wiegman
chriswiegman.com › home › blog › installing node lts with the latest npm using nvm
Installing Node LTS with The Latest NPM using NVM | Chris Wiegman
August 4, 2025 - The following one-liner will install the latest Node.js LTS version and the latest NPM all in one. It’s so much faster that splitting it out and can really help make sure that your toolchain is up to date. nvm install --lts --latest-npmCode ...
🌐
HeyNode
heynode.com › tutorial › install-nodejs-locally-nvm
Install Node.js Locally with Node Version Manager (nvm) | HeyNode
NVM stands for Node.js Version Manager. The nvm command is a POSIX-compliant bash script that makes it easier to manage multiple Node.js versions on a single environment. To use it, you need to first install the bash script, and add it to your shell’s $PATH.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-node-js-on-ubuntu-22-04
How to Install Node.js on Ubuntu (Step-by-Step Guide) | DigitalOcean
May 28, 2025 - You can always activate the system-installed version of Node using nvm use system. You can install a release based on these aliases as well. For instance, to install fermium, run the following: ... OutputDownloading and installing node v14.21.3... Downloading https://nodejs.org/dist/v14.21.3/node-v14.21.3-linux-x64.tar.xz... ################################################################################# 100.0% Computing checksum with sha256sum Checksums matched! Now using node v14.21.3 (npm v6.14.18)
🌐
Nvmnode
nvmnode.com
NVM - Node.js Version Manager tool - NVM Documentation
Use .nvmrc files to automatically switch to the correct Node.js version for each project. ... Straightforward commands for installing, switching, and managing Node.js versions. ... Configure mirrors for faster downloads in regions with slow connections to the official Node.js servers. ... Each Node.js version comes with its own npm installation, ensuring complete environment isolation.
Top answer
1 of 11
307
  1. Using homebrew install nvm:

    brew update
    brew install nvm
    source $(brew --prefix nvm)/nvm.sh
    

    Add the last command to the .profile, .bashrc or .zshrc file to not run it again on every terminal start. So for example to add it to the .profile run:

    echo "source $(brew --prefix nvm)/nvm.sh" >> ~/.profile
    

    If you have trouble with installing nvm using brew you can install it manually (see here)

  2. Using nvm install node or iojs (you can install any version you want):

    nvm install 0.10
    # or
    nvm install iojs-1.2.0
    
  3. npm is shipping with node (or iojs), so it will be available after installing node (or iojs). You may want to upgrade it to the latest version:

    $ npm install -g npm@latest
    

    UPD Previous version was npm update -g npm. Thanks to @Metallica for pointing to the correct way (see the comment below).

  4. Using npm install ionic:

    npm install -g ionic
    
  5. What about ngCordova: you can install it using npm or bower. I don't know what variant is more fit for you, it depends on the package manager you want to use for the client side. So I'll describe them both:

    1. Using npm: Go to your project folder and install ng-cordova in it:

      npm install --save ng-cordova
      
    2. Using bower: Install bower:

       npm install -g bower
      

      And then go to your project folder and install ngCordova in it:

       bower install --save ngCordova
      

PS

  1. Some commands may require superuser privilege
  2. Short variant of npm install some_module is npm i some_module
2 of 11
132

Use nvm to install Node.js, not Homebrew

In most of the answers, the recommended way to install nvm is to use Homebrew.

Don't do this.

On nvm's Github Readme is clearly says:

Homebrew installation is not supported. If you have issues with homebrew-installed nvm, please brew uninstall it, and install it using the instructions below, before filing an issue.

Use the following method instead

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).

And then use nvm to install node. For example to install latest LTS version do:

nvm install 16

Clean and hassle free. It will set this as your default Node.js version as well so you should be all set.

🌐
freeCodeCamp
freecodecamp.org › news › node-version-manager-nvm-install-guide
Node Version Manager – NVM Install Guide
September 9, 2022 - By Dillion Megida In this article, I'll explain how you can install NVM, or Node Version Manager, on Windows, Linux, and Mac. What is NVM? Node Version Manager (NVM), as the name implies, is a tool for managing Node versions on your device. Differen...
🌐
Reddit
reddit.com › r/webdev › nvm or homebrew for node install
r/webdev on Reddit: Nvm or homebrew for Node install
April 12, 2023 -

I come across this decision every time I get a new Mac laptop/computer.

I like nvm, node version manager, because it allows me to install multiple versions of node/npm in case I need to switch within different versions.

Does homebrew offer the same? Are there other install recommendations for Mac?

The need to switch node versions does come up when asked to work on another project that is “stuck” on an older version of node due to outdated packages that no one wants to maintain but is still used in the project.

April 12, 2023 Update Thanks for all the great recommendations and insight. I decided to use fnm for my own preference at this time, but all alternatives seem great in their own way. Here is a great article from Honeybadger comparing many node environment managers: https://www.honeybadger.io/blog/node-environment-managers