Skip to content

[Bug] npm upgrade path: npm 11 skips bun postinstall, and Windows reinstall fails EBUSY while the service runs #8361

Closed

Description

@lidge-jun

Summary

Upgrading an npm-installed OpenCodex is fragile on npm 11 and on Windows while the service runs. Both cases hit today while preparing Children for Remote Link.

1. npm 11 allow-scripts silently skips bun's postinstall

  • Windows: npm install -g @bitkyc08/[email protected] printed npm warn allow-scripts [email protected] (postinstall: node install.js) and finished "successfully"; the bun postinstall did not run.
  • macOS: an existing global install was left unusable — every ocx call printed opencodex: the 'bun' dependency is not installed … Reinstall with: npm install -g --allow-scripts=bun @bitkyc08/opencodex.

The docs/README install line should include --allow-scripts=bun (or the package should not depend on a lifecycle script npm 11 blocks by default).

2. Windows: reinstall while the service runs fails with EBUSY

npm error EBUSY: resource busy or locked, copyfile '…\npm\node_modules\@bitkyc08\opencodex\node_modules\bun\bin\bunx.exe' -> '…\npm\node_modules\@bitkyc08\.opencodex-XXXX\node_modules\bun\bin\bunx.exe'

The running service (bun.exe from the same package) locks the files. ocx service restart afterwards did pick up the new version, but the --allow-scripts=bun reinstall could not complete without stopping the service first. Related to the closed #5624 (locked bunx.exe leftover temp dir).

Suggested fix

  • README / ocx update npm path: use --allow-scripts=bun, and on Windows stop the service before npm install -g, then restart it (or print that instruction when an npm-managed install is detected).
  • ocx doctor: detect the "bun postinstall skipped" state and print the exact fix.

Acceptance

Following the documented npm upgrade steps on npm 11 (macOS and Windows, service running) ends with a working ocx and service on the new version.

Activity

  1. coderabbitai commented on Nov 8, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #8103 - feat(update): orchestrated ocx update plan/apply contract (update.orchestrated/1) [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added
    platform
    on Nov 8, 2026
  3. added a commit that references this issue on Nov 9, 2026
    9129c0e
  4. added a commit that references this issue on Nov 9, 2026
    ff2f5de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions