The native Claude Code binary is of non-trivial size (> 200 MB) and is listed as an optional dependency to the NPM package. This means NPM will try to download it, but if the download is interrupted, the container image build will still finish successfully. However, when the user tries to run Leash, they will get the error
Error: claude native binary not installed.
Either postinstall did not run (--ignore-scripts, some pnpm configs)
or the platform-native optional dependency was not downloaded
(--omit=optional).
Run the postinstall manually (adjust path for local vs global install):
node node_modules/@anthropic-ai/claude-code/install.cjs
Or reinstall without --ignore-scripts / --omit=optional.
I solved it by building the container again, but the Makefile could benefit from a verification step where it fails if the Claude Code binary is missing from the container image.
The native Claude Code binary is of non-trivial size (> 200 MB) and is listed as an optional dependency to the NPM package. This means NPM will try to download it, but if the download is interrupted, the container image build will still finish successfully. However, when the user tries to run Leash, they will get the error
I solved it by building the container again, but the Makefile could benefit from a verification step where it fails if the Claude Code binary is missing from the container image.