Claude Code: Error: claude native binary not installed.
The npm package installs `claude` as a placeholder that its postinstall step replaces with a native binary for your platform. The exact message, why Claude Code prints it, and the fix.
Updated November 23, 2026 · Checked against npm installs of the native-binary package in 2026; widespread since npm 12 (released 2026-07-08) stopped running postinstall by default, including during Claude Code's own npm-based auto-update (issue #86941)., reproduced in EnvHaven 1.9.0
The message
Error: claude native binary not installed.
What it means
The npm package installs claude as a placeholder that its postinstall step replaces with a native binary for your platform. If postinstall didn’t run (npm 12 skips dependency install scripts by default, as do --ignore-scripts and some pnpm setups) or the optional platform package wasn’t downloaded (--omit=optional), the placeholder stays and prints this message.
Fix
- Run
npm --version. On npm 12, either switch to the native installer (curl -fsSL https://claude.ai/install.sh | bash, then uninstall the npm package) or allow the script:npm config set "allow-scripts=@anthropic-ai/claude-code" --location=user, thennpm install -g @anthropic-ai/claude-code@latest. - On other npm versions, run the postinstall manually:
node node_modules/@anthropic-ai/claude-code/install.cjs(adjust the path for a global install). - Or reinstall without --ignore-scripts or --omit=optional, and check .npmrc doesn’t set optional=false.
- If the reinstall fails with EACCES, use the native installer instead of sudo.
In an EnvHaven workspace
No: EnvHaven has built-in support for Claude Code, on the PATH in every workspace.
Where this comes from
This message was produced by Claude Code (npm installs of the native-binary package in 2026; widespread since npm 12 (released 2026-07-08) stopped running postinstall by default, including during Claude Code’s own npm-based auto-update (issue #86941).) itself, in a throwaway EnvHaven 1.9.0 container, on 2026-11-23; the text above is copied from that output.