Summary
npm install fails for @stacksjs/clarity because the published package runs this postinstall script:
bunx git-hooks && bun ./scripts/postinstall.ts
The first command fails with:
error: could not determine executable to run for package git-hooks
Reproduction
npm install -g @stacksjs/clarity
Actual result
Install exits with code 1 because postinstall fails on bunx git-hooks.
Expected result
Package installs successfully with npm.
Why this happens
The npm package named git-hooks does not expose an executable. The executable git-hooks is provided by bun-git-hooks.
So bunx git-hooks appears to resolve the wrong package name in postinstall.
Impact
This also breaks transitive installs for packages that depend on @stacksjs/clarity (for example via bunfig), so unrelated installs fail.
Related
A matching issue exists in @stacksjs/clapp:
Suggested fixes
- Remove dev-only git hook setup from published package
postinstall, or guard it so it only runs in the source repo.
- If postinstall must remain, use the correct package/binary (for example
bunx bun-git-hooks) and ensure it does not fail consumer installs.
Environment
- macOS 15.3 (Darwin 25.3.0)
- Node v22.18.0
- npm 10.9.3
- Bun present on PATH
Summary
npm installfails for@stacksjs/claritybecause the published package runs this postinstall script:bunx git-hooks && bun ./scripts/postinstall.tsThe first command fails with:
Reproduction
Actual result
Install exits with code 1 because postinstall fails on
bunx git-hooks.Expected result
Package installs successfully with npm.
Why this happens
The npm package named
git-hooksdoes not expose an executable. The executablegit-hooksis provided bybun-git-hooks.So
bunx git-hooksappears to resolve the wrong package name in postinstall.Impact
This also breaks transitive installs for packages that depend on
@stacksjs/clarity(for example viabunfig), so unrelated installs fail.Related
A matching issue exists in
@stacksjs/clapp:bunx git-hooks(no executable ingit-hookspackage) clapp#1543Suggested fixes
postinstall, or guard it so it only runs in the source repo.bunx bun-git-hooks) and ensure it does not fail consumer installs.Environment