skip to Main Content

I try to run

npm install -g bun

But it’s giving me this error in my terminal

Unsupported platform for [email protected]: wanted {"os":"darwin,linux","arch":"arm64,x64"} (current: {"os":"win32","arch":"x64"})

Can anyone help me how can I install Bun on my Windows laptop? Thank you

A solution to install Bun

2

Answers


  1. It’s an error from npm, so maybe it’s some bug with bun as its in initial relases, however i would suggest clearing the npm cache and then upgrading npm with the following commands:

    sudo npm cache clean -f
    npm install npm@latest -g
    

    and then try installing bun again using the standard procedure. Lets hope it works, if it doesn’t, maybe wait it out a day or two until enough people face this issue because the [email protected] released a few days ago.

    UPDATE: Turns out you can use WSL on windows to run its container. It still not fully supported on windows yet.

    Login or Signup to reply.
  2. Bun does not support windows natively at the moment. You need to install WSL to work with bun in windows.

    See also:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search