Skip to content

pnpm install bun fails after the first time #25031

@recrsn

Description

@recrsn

What version of Bun is running?

1.3.2+b131639cc

What platform is your computer?

Darwin 25.1.0 arm64 arm

What steps can reproduce the bug?

Add bun >= 1.3.0 to a dev dependency in a pnpm monorepo, run pnpm install, it suceeds, running pnpm install again will fail

What is the expected behavior?

pnpm install should be unaffected

What do you see instead?

xx/yy/node_modules/.pnpm/bun@1.3.2/node_modules/bun: Running postinstall script, failed in 448ms
.../.pnpm/bun@1.3.2/node_modules/bun postinstall$ node install.js
│ Failed to find package "@oven/bun-darwin-aarch64". You may have used the "--no-optional" flag when running "npm install".
│ Error: Failed to install package "bun"
│     at /Users/amitosh/Workspace/cc/bb/xx/yy/node_modules/.pnpm/bun@1.3.2/node_modules/bun/install.js:399:11
│     at Generator.throw (<anonymous>)
│     at rejected (/Users/amitosh/Workspace/cc/bb/xx/yy/node_modules/.pnpm/bun@1.3.2/node_modules/bun/install.js:36:27)
│     at process.processTicksAndRejections (node:internal/process/task_queues:103:5)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions