Skip to content

bun npm package doesn't work on Windows ("This app can't run on your PC"), but "@oven/bun-windows-x64" works fine #18041

@theinfinit

Description

@theinfinit

What version of Bun is running?

Installed via PNPM: "bun": "1.2.4",

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

First, why I want to install bun as a dependency? To run bun test from package.json scripts even if I'm not using bun as a package manager (at least for now :)).

Run on Windows machine:

  1. pnpm add -D bun
  2. pnpm bun, then I get the error:
    This app can't run on your PC
  3. After closing the dialog, there is Access is denied. in the console output.

To get it woking, I had to install @oven/bun-windows-x64

  1. pnpm rm -D bun
  2. pnpm add -D @oven/bun-windows-x64
  3. pnpm bun will work now.

It didn't worked when I had both bun and @oven/bun-windows-x64 installed as dependencies.

Context

Aside from that,

  • I have bun installed globally on my machine via winget install --id Oven-sh.Bun

  • Tested inside pnpm workspace

  • During installation of bun, these binaries were downloaded:

    devDependencies:
    + bun 1.2.4
    
    ../../..                                 |   +3 +
    Downloading @oven/bun-windows-x64-baseline@1.2.4: 40,09 MB/40,09 MB, done
    Downloading @oven/bun-windows-x64@1.2.4: 40,22 MB/40,22 MB, done

    Then, when I replaced it with @oven/bun-windows-x64, pnpm haven't downloaded any new binaries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions