wxt-dev / wxt

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

`pnpm dlx wxt` throws error resolving `@wxt-dev/module-svelte` but other package managers don't #1160

Open 42Willow opened 3 days ago

42Willow commented 3 days ago

Describe the bug

image

For some reason the error is only when using the pnpm package manager, I ran into this issue when migrating over to pnpm from bun and my ci stopped working.

I have not tested with yarn, but I know it works for both bun and npm

Reproduction

https://github.com/schooltape/schooltape

Steps to reproduce

clone the repo pnpm install pnpx wxt OR pnpm dlx wxt

System Info

System:
    OS: Linux 6.6 NixOS 24.05 (Uakari) 24.05 (Uakari)
    CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
    Memory: 8.50 GB / 15.27 GB
    Container: Yes
    Shell: 0.93.0 - /run/current-system/sw/bin/nu
  Binaries:
    Node: 20.17.0 - /etc/profiles/per-user/willow/bin/node
    npm: 10.8.2 - /etc/profiles/per-user/willow/bin/npm
    pnpm: 9.7.0 - /etc/profiles/per-user/willow/bin/pnpm
    bun: 1.1.8 - /etc/profiles/per-user/willow/bin/bun
  Browsers:
    Chromium: 130.0.6723.91

Used Package Manager

pnpm

Validations

1natsu172 commented 2 days ago

I think this is because pnpm hotloads when dlx, not refer locally. bunx and npx have local cache priority, so if it's in node_modules, they use it.