wxt-dev / wxt

⚡ Next-gen Web Extension Framework
https://wxt.dev
MIT License
4.7k stars 204 forks source link

Bun installation doesn't work on Windows #707

Closed s-h-a-d-o-w closed 3 months ago

s-h-a-d-o-w commented 5 months ago

Describe the bug

Followed the instructions for bun here: https://wxt.dev/get-started/installation.html#bootstrap-project

Got this:

  ⚙️  esbuild [1/3] Resolving dependencies
Resolved, downloaded and extracted [4]
Saved lockfile
error: could not determine executable to run for package exec

error: postinstall script from "esbuild" exited with 1

There doesn't seem to be a problem with esbuild per se though:

bun add v1.1.12 (43f0913c)

installed esbuild@0.21.4 with binaries:
 - esbuild

29 packages installed [5.03s]

Reproduction

Run bunx wxt@latest init repro.

Steps to reproduce

Run bunx wxt@latest init repro.

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz
    Memory: 46.69 GB / 63.87 GB
  Binaries:
    Node: 18.18.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.10.5 - ~\AppData\Local\pnpm\pnpm.EXE
    bun: 1.1.12 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (125.0.2535.85)
    Internet Explorer: 11.0.19041.4355

Used Package Manager

bun

Validations

aklinker1 commented 5 months ago

Interesting, someone reported this in discord, but were unable to install ESBuild in a fresh project. Will try and look into this soon.

aklinker1 commented 5 months ago

OK, tested this out, looks like this only happens when using bunx. Once the project is initialized, bun install works just fine.

For now, use NPM to initialize bun projects. Choose "bun" for the package manager, and you'll be good to go.

npx wxt@latest init
s-h-a-d-o-w commented 5 months ago

Cool, thanks!

aklinker1 commented 5 months ago

Updated docs for now: 53b4eac9557a6fcc14ffff66cac57baf6e56586c

Probably won't get to this for a while, so if anyone else wants to try and tackle this, feel free! I have no idea where to start though, so I can't share any helpful hints :/

aklinker1 commented 3 months ago

Gonna go ahead and close this as stale. Feel free to re-open if this is still an issue.