Skip to content

postinstall.js doesn't run automatically on npm install -g; binary bootstrap fails #369

@blueman82

Description

@blueman82

Environment

  • OS: macOS (arm64)
  • npm version: 11.6.2
  • Node version: v24.10.0
  • Installation method: npm install -g @just-every/code@latest

Steps to Reproduce

  1. Run npm uninstall -g @just-every/code
  2. Run npm install -g @just-every/code@latest
  3. Run code --version

Expected Behavior

Binary installs successfully and code --version displays the version number.

Actual Behavior

  • postinstall.js does not run automatically during install
  • Bootstrap logic in coder.js fails to download the binary
  • Users get error: /Users/harrison/.bun/bin/code: line 2: /Users/harrison/.bun/bin/coder: No such file or directory
  • Wrapper script exists but points to missing binary

Workaround

Manually running node postinstall.js from the codex-cli directory completes installation successfully.

Additional Notes

The coder.js file contains robust bootstrap logic that should handle missing binaries, but it didn't trigger. The error message "Upgrade helper error: hit step limit without completing guided session" was not helpful for debugging.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions