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✅ Done
Activity
rxliuli commentedon Nov 28, 2026
rxliuli commentedon Nov 28, 2026
Follow-up findings from deeper end-to-end re-testing across a clean macOS 27.2.1 (arm64) VM, post-Xcode-CLT macOS (with no
~/.zshrc), andubuntu:24.04Linux containers (aarch64andamd64):0installhas no native ARM64 standalone binary on macOS or Linux./0install.sh->./0install.sh install homereveals a second failure:https://get.0install.net/0install-darwin-arm64-latest.tar.bz2performs two302redirects to a September 2020 Intel build (0install-darwin-arm64-2.16.tar.bz2→0install-darwin-x86_64-2.16.tar.bz2). Running./0install.sh install homeprints./0install: Bad CPU type in executable(and its extractedinstall.shlacksset -e, so it still printsOKand installs thex86_64binary into~/bin/0install), causing all0install add ...commands to fail withzsh: bad CPU type in executable: 0install. Upstreamhttps://get.0install.net/defaults macOS users tobrew install zero-install(Homebrew ships native arm64 bottles for v2.18), which is redundant with the existing Homebrew option onnodejs.org.aarch64,https://get.0install.net/0install-linux-aarch64-latest.tar.bz2redirects tohttps://github.com/0install/0install/releases/download/v2.18/0install-linux-aarch64-2.18.tar.bz2which returns HTTP 404.x86_64,./0install.sh install homeworks end-to-end (0install 2.18,node v26.13.1,npm 11.20.0).n.bashalso fails in the current shell even whenmake/ Xcode CLT is installed (and on Linux)CONTINUE (y/N)? y,n-installupdates~/.bashrc/~/.zshrcfor new shells, butn.bashhas noexport N_PREFIX="$HOME/n"/export PATH="$N_PREFIX/bin:$PATH"for the current shell.node -vandnpm -vcommands immediately fail withcommand not foundin the same shell on both Linux (ubuntu:24.04) and macOS (post-Xcode-CLT).nvm.bashdoes not persist across new terminals on a clean macOS machine (even after installing Xcode CLT)~/.zshrcby default.nvm'sinstall.shdoes not create one—it prints=> Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zprofile, ~/.zshrc, and ~/.profile.and skips profile setup.node -vworks in the initial shell via\. "$HOME/.nvm/nvm.sh", butnvm,node, andnpmare allcommand not foundin any newly opened terminal window.Opened two split PRs
fnm.bash,brew.bash,n.bash, andzeroinstall.bash(with full macOS + Linux verification notes, including the0installARM64 findings above for maintainers to decide on platform compatibility).#shell comments when copying download snippets to the clipboard while keeping them visible on the page.