Repository navigation
Description
URL:
https://nodejs.org/en/download
Browser Name:
Safari (snippets copied into macOS default Terminal.app running /bin/zsh)
Browser Version:
Safari 27.2
Operating System:
macOS 27.2.1 (26B131), Apple Silicon (arm64) — fresh VM with default /bin/zsh, no ~/.zshrc, no Xcode Command Line Tools, and no Homebrew
How to reproduce the issue:
On a brand-new macOS machine (or clean macOS VM), open https://nodejs.org/en/download, select macOS, and test every single one of the 7 shell install options by clicking the snippet's Copy button and pasting it into the default macOS Terminal (/bin/zsh).
Summary of results (6 out of 7 fail on a clean Mac)
| # | Option | Snippet file | Result on clean macOS | Root cause |
|---|---|---|---|---|
| 1 | nvm (default) | apps/site/snippets/*/download/nvm.bash |
❌ Fails | nvm's installer requires git, which triggers the macOS Xcode CLT stub and aborts (You may be on a Mac, and need to install the Xcode Command Line Developer Tools). No prerequisite is mentioned on the page. |
| 2 | fnm | apps/site/snippets/*/download/fnm.bash |
❌ Fails | fnm's install script detects curl (OK!) and unzip (OK!), but defaults to USE_HOMEBREW="true" on macOS unless --force-no-brew is passed, so it aborts with Checking availability of Homebrew (brew)... Missing!. |
| 3 | Homebrew | apps/site/snippets/*/download/brew.bash |
❌ Fails (broken command) | The snippet pipes the installer via curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash, which consumes stdin. Homebrew immediately aborts with Warning: Running in non-interactive mode because 'stdin' is not a TTY. → Insufficient permissions to install Homebrew to "/opt/homebrew". Homebrew's official command is /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" specifically to keep stdin attached to the TTY for sudo. |
| 4 | n | apps/site/snippets/*/download/n.bash |
❌ Fails | Aborts immediately with n-install: ERROR: GNU Make not found, which is required for operation. (no prerequisite mentioned). |
| 5 | 0install | apps/site/snippets/*/download/zeroinstall.bash |
❌ Fails (broken command) | Runs ./0install.sh without arguments, which only prints usage help (To install to your home directory: ./0install.sh install home) without installing 0install, so all subsequent 0install add ... commands fail. |
| 6 | asdf | apps/site/snippets/*/download/asdf.bash |
❌ Fails | Does not install asdf first (only comments pointing to external docs), so pasting the snippet fails with zsh: command not found: asdf. |
| 7 | Vite+ | apps/site/snippets/*/download/vp.bash |
✅ Succeeds (with zsh # errors) |
The only option that actually installed Node.js (v26.13.1) and npm (11.20.0) on a clean Mac without prior developer tooling, though pasting still emitted 4 zsh: command not found: # lines. |
Cross-cutting bug affecting all 7 snippets on macOS: # comments fail in default zsh
Since macOS Catalina (2019), the default shell on macOS is zsh, where INTERACTIVE_COMMENTS is disabled by default. Copying any multi-line snippet from the download page and pasting it into Terminal.app prints zsh: command not found: # for every comment line (and treats inline # Should print "..." comments as literal CLI arguments).
Observed terminal outputs on clean macOS 27.2.1 (arm64)
1. nvm
zsh: command not found: #
You may be on a Mac, and need to install the Xcode Command Line Developer Tools.
If so, run `xcode-select --install` and try again. If not, please report this!
zsh: command not found: #
.: no such file or directory: /Users/ruri/.nvm/nvm.sh
zsh: command not found: #
zsh: command not found: nvm
zsh: command not found: #
zsh: command not found: node
zsh: command not found: #
zsh: command not found: npm
2. fnm
zsh: command not found: #
Downloading fnm using Homebrew...
Checking dependencies for the installation script...
Checking availability of curl... OK!
Checking availability of unzip... OK!
Checking availability of Homebrew (brew)... Missing!
Not installing fnm due to missing dependencies.
zsh: command not found: #
zsh: command not found: fnm
3. Homebrew
zsh: command not found: #
Warning: Running in non-interactive mode because `stdin` is not a TTY.
==> Checking for `sudo` access...
Insufficient permissions to install Homebrew to "/opt/homebrew".
zsh: command not found: #
zsh: command not found: brew
4. n
zsh: command not found: #
n-install: ERROR:
GNU Make not found, which is required for operation.
On FreeBSD and PC-BSD, for instance, you can download it with `sudo pkg install gmake`.
5. 0install
zsh: command not found: #
This script runs 0install from your PATH or downloads it on-demand.
To run 0install commands without adding 0install to your PATH:
./0install.sh --help
./0install.sh COMMAND [OPTIONS]
To install to /usr/local:
sudo ./0install.sh install local
To install to your home directory:
./0install.sh install home
6. asdf
zsh: command not found: #
zsh: command not found: asdf
7. Vite+
✓ Vite+ setup complete.
zsh: command not found: #
zsh: command not found: #
VITE+ - The Unified Toolchain for the Web
✓ Default Node.js version set to 26.13.1
zsh: command not found: #
v26.13.1
zsh: command not found: #
11.20.0
Suggested fixes
- Strip
#comments when copying (or omit comments from copyable code blocks) so pasting into macOS's default interactivezshdoesn't emitzsh: command not found: #. - Fix
brew.bash: use Homebrew's official interactive invocation (/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)") instead of piping tobash, and note that Homebrew requireseval "$(/opt/homebrew/bin/brew shellenv)"on Apple Silicon beforebrew installworks in the same shell. - Fix
fnm.bashon macOS: pass--force-no-brew(curl -fsSL https://fnm.vercel.app/install | bash -s -- --force-no-brew) sofnminstalls directly viacurl+unzipwithout requiring Homebrew. - Fix
zeroinstall.bash: change./0install.shto./0install.sh install homeso0installis actually installed into$HOME/bin. - Document prerequisites clearly (or reconsider the default macOS option): explicitly note that
nvmandnrequire Xcode Command Line Tools (git/make) on macOS — or promote an option that works out of the box on a clean Mac (such as the official.pkginstaller, fixedfnm --force-no-brew, orvp).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields📋 Backlog
Activity
rxliuli commentedon Nov 28, 2026