Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install bun on windows #5247

Closed
yairyakobson opened this issue Sep 13, 2023 · 24 comments
Closed

Can't install bun on windows #5247

yairyakobson opened this issue Sep 13, 2023 · 24 comments
Labels
bug Something isn't working

Comments

@yairyakobson
Copy link

What version of Bun is running?

1.0.1

What platform is your computer?

Windows 11

What steps can reproduce the bug?

I just get an error that it failed to install

Bun Installation

What is the expected behavior?

No response

What do you see instead?

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for bun@1.0.1: wanted {"os":"darwin,linux","cpu":"arm64,x64"} (current: {"os":"win32","cpu":"x64"})
npm ERR! notsup Valid os: darwin,linux
npm ERR! notsup Actual os: win32
npm ERR! notsup Valid cpu: arm64,x64
npm ERR! notsup Actual cpu: x64

Additional information

Can Bun be installed on just on macOS and Linux at this point?

And what minimal version of macOS is required because I didn't see it in the documentation

@yairyakobson yairyakobson added the bug Something isn't working label Sep 13, 2023
@7heMech
Copy link

7heMech commented Sep 13, 2023

image
No one said bun was supported on windows, you need wsl.

@yairyakobson
Copy link
Author

yairyakobson commented Sep 13, 2023 via email

@7heMech
Copy link

7heMech commented Sep 13, 2023

@yair2000 Windows Subsystem for Linux
It basically lets you run linux on windows.

@AdrianoLupossa
Copy link

Windows Subsystem for Linux (WSL) is the right env to run bun on windows

@yairyakobson
Copy link
Author

yairyakobson commented Sep 13, 2023 via email

@ghiscoding
Copy link

duplicate of #43

@Hecatron
Copy link

Hecatron commented Sep 15, 2023

Windows Subsystem for Linux (WSL) is the right env to run bun on windows

WSL means enabling Hyper-V
Hyper-V means that you're actually running the main OS inside a virtual machine
this can impact things such as gaming, so I've always avoided it myself.

The other option is Msys2 which sort of simulates unix api's under windows in a shell.
But it looks as if the curl command curl -fsSL https://bun.sh/install | bash doesn't work under Msys2 due to the os detection within bun picking up that it's windows and blocking it from running

@icjosh10
Copy link

image No one said bun was supported on windows, you need wsl.

Except the docs literally do say that bun is supported (just in a limited capacity).

@Hecatron
Copy link

In #43 they say it's being worked on
I don't think you can ask more than that to be fair, it sounds as if the native build is still experimental.

@yairyakobson
Copy link
Author

yairyakobson commented Sep 15, 2023 via email

@WasathTheekshana
Copy link

Hi @yair2000 !

npm official page tells, that you need to install Bun 1.0 on WLS (Windows Subsystem for Linux)

Screenshot 2023-09-16 133113

  1. Try installing WSL from windows store & on top of it install the bun
    How to install WSL

  2. After that refer the bun official doc installation guide.

curl -fsSL https://bun.sh/install | bash

Bun Docs

@huangkaoya
Copy link

why bun not supported windows?

@GabrielDougherty
Copy link

On https://bun.sh/docs/installation#windows it says:

Bun provides a limited, experimental native build for Windows. At the moment, only the Bun runtime is supported.

bun
bun run

I am interested in obtaining that experimental native build rather than the WSL one.

@Hecatron
Copy link

If you search the existing messages
The main tracking issue for windows support is - #43
The pull request being worked on is - #4410

I suspect you'd have to try and manually build the source (from the pull request)
although I have no idea if it even works at this point, since I've not tried it myself

@faizov
Copy link

faizov commented Sep 17, 2023

It's really sad that we can't use in windows directly. Can WSL affect performance?

@Anubarak
Copy link

Anubarak commented Sep 19, 2023

image No one said bun was supported on windows, you need wsl.

Well actually they said it in their release notes

https://bun.sh/blog/bun-v1.0#bun-more-thing

Bun provides native builds for macOS and Linux, but there's been one notable absence: Windows. Previously, to run Bun on Windows, you would need to install Windows Subsystem for Linux... but not anymore.
For the first time, we're excited to release an experimental, native build of Bun for Windows.

Sorry if I get this wrong but for this sounds like it is indeed supported. Experimental and not completed but installable at least.

@kangfredy
Copy link

hope it will works on windows

@abhishekpatelmc
Copy link

Why can't we use Bun on Windows currently?
How does JSC prevent Bun from running on Windows?

@Hecatron
Copy link

Hecatron commented Oct 2, 2023

Why can't we use Bun on Windows currently? How does JSC prevent Bun from running on Windows?

if you read the above comments, it's still be worked on
I posted links to the pull request and issue where it's being worked on

@Stanzilla
Copy link

I'm confused by this as well, if there is a native build, npm should not refuse to install it. If there is not, the docs need to be updated.

@Electroid
Copy link
Contributor

Please track this issue for when Windows is ready: #43 (we're actively working on it)

@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
@JRBros2346
Copy link

It is noted in installation page that windows have runtime support. But i cant find any runtimee binaries

@fras-alfurasy
Copy link

when it's going to be supported for windows ????

@BenjaBobs
Copy link

@Fras999 see #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests