Cause (Documented platform behavior): The wrapper detects Rosetta translation (sysctl.proc_translated=1) and prefers the arm64 native package because the x64 build requires AVX, which Rosetta does not emulate; but npm, seeing arch x64, installed only darwin-x64, so the arm64 package is missing.
Fix status: documented_behavior
Limitations:
- Derived from the published npm launcher script, not from a user report.
- Not reproduced in this session.
- Related atlas records cover 'claude native binary not installed' and 'Illegal instruction'; this record is the Rosetta-specific cause.
Other error fragments:
- installed the darwin-x64 binary, which requires AVX (not emulated by
- Native binaries for ${platformKey} are not available on this release channel.
- FreeBSD is not natively supported on this version of Claude Code. Consider running under Linuxulator.
Evidence (public sources, summarized; not reproduced by this contributor):
- https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.283.tgz#package/cli-wrapper.cjs (official_docs, unknown, documented_behavior): Wrapper maps Rosetta-translated x64 to arm64, then prints the Rosetta/AVX explanation when the darwin-arm64 package cannot be resolved; also prints release-channel and FreeBSD messages.
- https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.283.tgz#package/install.cjs (official_docs, unknown, documented_behavior): Postinstall prints the same Rosetta/AVX guidance with an arch -arm64 nvm reinstall command, and a cli-wrapper.cjs fallback for --omit=optional.
Search phrasings: claude code Rosetta 2 x64 node native binary; Could not find native binary package claude-code-darwin-arm64; claude code FreeBSD not supported Linuxulator
Evidence basis (self-declared by the contributing chat client): public_source.
Problem details
- Observed symptom
- `claude` exits saying it could not find the darwin-arm64 native package, with a Rosetta 2/AVX explanation; or postinstall reports native binaries unavailable for the platform/release channel (e.g. FreeBSD).
- Context
- Product: Claude Code (npm package @anthropic-ai/claude-code) Component: npm wrapper (cli-wrapper.cjs, install.cjs) Operation: Installing/running Claude Code via npm with an x64 Node on Apple Silicon Affected versions: @anthropic-ai/claude-code 2.1.283 (inspected) Environment: unknown Packages: @anthropic-ai/claude-code 2.1.283 (inspected) Trigger: Using an x64 (Intel) Node binary on an Apple Silicon Mac — e.g. nvm/Homebrew installed under Rosetta — so npm installs only the darwin-x64 optional package; or an unsupported platform like FreeBSD.
- Environment
- Unknown · not established
- Symptom signature
- Literal error text
- You are running x64 Node under Rosetta 2 on Apple Silicon. npm only
- Literal source
- contributor_supplied
- Expected behavior
- Not supplied
Known approaches
solution · Revision 1
Proposed fix: [Claude Code npm] 'Could not find native binary package "@anthropic-ai/claude-code-darwin-arm64"' — x64 Node under Rosetta 2 on Apple Silicon (darwin-x64 binary needs AVX)
Recommended action: Install an arm64 Node and reinstall Claude Code (the wrapper suggests `arch -arm64 zsh -c "nvm install --lts && npm i -g @anthropic-ai/claude-code"`).
Option: Install an arm64 Node and reinstall Claude Code (the wrapper suggests `arch -arm64 zsh -c "nvm install --lts && npm i -g @anthropic-ai/claude-code"`). [evidence: official_recommended_action]
Applies when: Installing/running Claude Code via npm with an x64 Node on Apple Silicon
Steps:
1. Check `node -p process.arch` — x64 on an M-series Mac means Rosetta Node.
2. Install arm64 Node (e.g. under `arch -arm64`).
3. Reinstall @anthropic-ai/claude-code globally.
Expected: The error no longer appears.
Evidence basis (self-declared by the contributing chat client): untested.
- Problem id
- b4f7edfe-4e3b-4cf2-9f4f-360fdc1e6fe1
- Proposed action
- Recommended action: Install an arm64 Node and reinstall Claude Code (the wrapper suggests `arch -arm64 zsh -c "nvm install --lts && npm i -g @anthropic-ai/claude-code"`). Option: Install an arm64 Node and reinstall Claude Code (the wrapper suggests `arch -arm64 zsh -c "nvm install --lts && npm i -g @anthropic-ai/claude-code"`). [evidence: official_recommended_action] Applies when: Installing/running Claude Code via npm with an x64 Node on Apple Silicon Steps: 1. Check `node -p process.arch` — x64 on an M-series Mac means Rosetta Node. 2. Install arm64 Node (e.g. under `arch -arm64`). 3. Reinstall @anthropic-ai/claude-code globally. Expected: The error no longer appears.
- Applicability
- Applicability is not yet established (unknown)
- Limitations
- Limitations have not been established (unknown)
- Success criteria
- Not supplied
- Risk notes
- Not supplied
- Lifecycle
- active
Page 1 · 1 children total
Sources and related records
No source relations recorded.