claude-code - 💡(How to fix) Fix [BUG] Publish @anthropic-ai/claude-code-freebsd-x64 (and -arm64) native binary packages

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

Code Example

'freebsd-x64':   { pkg: PACKAGE_PREFIX + '-freebsd-x64',   bin: BINARY_NAME },
  'freebsd-arm64': { pkg: PACKAGE_PREFIX + '-freebsd-arm64', bin: BINARY_NAME },

---



---

npm install -g @anthropic-ai/claude-code@2.1.145
  # postinstall runs install.cjs
  # → "[@anthropic-ai/claude-code postinstall] Native binaries for freebsd-x64
  #    are not available on this release channel."
  # → Available: darwin-arm64, darwin-x64, linux-x64, linux-arm64,
  #    linux-x64-musl, linux-arm64-musl, win32-x64, win32-arm64
  claude --version
  # → fails: bin/claude.exe is still the install-time stub

---

npm view @anthropic-ai/claude-code-freebsd-x64
  # → 404 Not Found
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Since 2.1.113, @anthropic-ai/claude-code switched from a bundled cli.js to a thin wrapper that copies a per-platform native binary from optionalDependencies. Both install.cjs and cli-wrapper.cjs already include FreeBSD in their PLATFORMS map:

  'freebsd-x64':   { pkg: PACKAGE_PREFIX + '-freebsd-x64',   bin: BINARY_NAME },
  'freebsd-arm64': { pkg: PACKAGE_PREFIX + '-freebsd-arm64', bin: BINARY_NAME },

…but the corresponding npm packages are not published (404), and the GitHub release assets contain only darwin/linux/win32 tarballs. As a result, every release from 2.1.113 onward is unusable on FreeBSD: install.cjs prints "Native binaries for freebsd-x64 are not available on this release channel."

The existing FreeBSD port (misc/claude-code in the official ports tree, maintained by [email protected]) tracked releases up to 2.1.110 by repackaging the bundled cli.js and running it under FreeBSD's Node.js. The wrapper-package change makes that approach impossible — the port now has no JS to install. Without a freebsd-x64 native binary, FreeBSD users are stuck at 2.1.112.

What Should Happen?

  1. @anthropic-ai/claude-code-freebsd-x64@<version> (and ideally -freebsd-arm64) is published to npm with the same shape as the existing @anthropic-ai/claude-code-linux-x64 package.
  2. claude-freebsd-x64.tar.gz (and -arm64) is attached to the GitHub releases alongside the existing darwin/linux/win32 tarballs.
  3. npm install -g @anthropic-ai/claude-code on FreeBSD then runs install.cjs, finds the matching optional dependency, and places the native binary — same flow as Linux.

The platform-detection code already exists in install.cjs/cli-wrapper.cjs, suggesting this was anticipated; only the binaries themselves need to be built and published.

Error Messages/Logs

Steps to Reproduce

On FreeBSD 15.x or 16-CURRENT with Node.js installed:

  npm install -g @anthropic-ai/[email protected]
  # postinstall runs install.cjs
  # → "[@anthropic-ai/claude-code postinstall] Native binaries for freebsd-x64
  #    are not available on this release channel."
  # → Available: darwin-arm64, darwin-x64, linux-x64, linux-arm64,
  #    linux-x64-musl, linux-arm64-musl, win32-x64, win32-arm64
  claude --version
  # → fails: bin/claude.exe is still the install-time stub

Equivalently:

  npm view @anthropic-ai/claude-code-freebsd-x64
  # → 404 Not Found

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.112

Claude Code Version

2.1.145

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Xterm

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Publish @anthropic-ai/claude-code-freebsd-x64 (and -arm64) native binary packages