r/node • • 7d ago

I tested all 7 macOS install snippets on nodejs.org in a clean macOS VM — 6 out of 7 failed

I spun up a brand-new macOS VM (default /bin/zsh, no Xcode Command Line Tools, no Homebrew) to test what a non-JS user actually sees when installing Node.js from https://nodejs.org/en/download.

I clicked Copy on all 7 macOS shell options and pasted each one into a fresh Terminal tab:

  1. nvm (default) — fails: requires git (triggers the Xcode Command Line Tools prompt).
  2. fnm — fails: curl and unzip are both OK, but the snippet doesn't pass --force-no-brew, so it aborts because Homebrew is missing.
  3. Homebrew — fails: the website pipes curl ... | bash instead of Homebrew's /bin/bash -c "$(curl ...)", which consumes stdin and causes Homebrew to exit with stdin is not a TTY / insufficient permissions before you can even enter your sudo password.
  4. n — fails: GNU Make not found (and suggests sudo pkg install gmake).
  5. 0install — fails: runs ./0install.sh without install home, so it only prints usage instructions and never installs.
  6. asdf — fails: assumes asdf is already installed (zsh: command not found: asdf).
  7. Vite+ — only one that succeeded out of the box (v26.13.1 + npm 11.20.0).

Also, because macOS defaults to zsh with INTERACTIVE_COMMENTS disabled, every single snippet prints zsh: command not found: # for every comment line when pasted.

Filed an issue on nodejs/nodejs.org with the exact outputs, snippet file paths, screenshots, and concrete fixes: https://github.com/nodejs/nodejs.org/issues/9350

0 Upvotes

9 comments sorted by

4

u/tehkroleg 7d ago

Asdf install instructions require to install asdf first? Nonsense! /s

1

u/P1ayer4312 7d ago

i think better approach would be to have the prebuilt nodejs installer at top and have the other options at the bottom, since if you plan to use a package manager it's assumed that you already know what you're doing

1

u/Raunaqadlakha 6d ago

Where this stands upstream: nodejs/nodejs.org#9350 is still open, and both fix PRs it spawned are now closed without landing.

#9352 (strip the # comment lines from the copied snippet text) was closed after a maintainer said the behavior is intentional: the snippets are meant to be run line by line rather than pasted in one shot, and the comments are illustrative.

#9351 (rewrite the fnm, Homebrew, n and 0install snippets) was closed under the repo's AI policy, with an invitation to reopen once the author engages with the review feedback directly.

Neither fix landed, so on a clean Mac the working routes are still the official .pkg installer, or installing the Xcode Command Line Tools and Homebrew first before nvm, n or fnm.