tldr; AFAIK the node formula opts out of the bundled npm and has code to install npm itself, but it defaults to not install it and has no option to override that.
brew update, I ran:
brew reinstall node ==> Reinstalling node --without-npm ==> Downloading https://nodejs.org/dist/v10.11.0/node-v10.11.0.tar.xz Already downloaded: /Users/mfrawley/Library/Caches/Homebrew/downloads/86b0da83f0376473debf56a6f68f0a3cca0ae8d439da5e3128ce912d9069b215--node-v10.11.0.tar.xz ==> ./configure --prefix=/usr/local/Cellar/node/10.11.0 --without-npm --with-intl=system-icu ==> make install ==> Caveats Homebrew has NOT installed npm. If you later install it, you should supplement your NODE_PATH with the npm module folder: /usr/local/lib/node_modules ==> Summary 🍺 /usr/local/Cellar/node/10.11.0: 325 files, 30MB, built in 17 minutes 17 seconds
As you can see, it didn’t install
npm. Only instance of that binary is from a previous install using the
whence npm /Users/mfrawley/.node/bin/npm
Looking at the formula, I see there is a
I also see that from the cli:
brew options node --email@example.com Build against Homebrew's OpenSSL instead of the bundled OpenSSL --without-icu4c Build with small-icu (English only) instead of system-icu (all locales) --without-npm npm will not be installed --HEAD Install HEAD version
However, from the install output above, you can see it ran --without-npm even though I didn’t pass that. I see in the formula option is always added:
I tried different combinations of adding args like
--with=npm but I get:
brew reinstall node --with-npm ==> Reinstalling node --without-npm Warning: node: this formula has no --with-npm option so it will be ignored!
I haven’t found a good way to install npm standalone, so just going to install node through the official download for now.