wxt
wxt copied to clipboard
`pnpm dlx wxt` throws error resolving `@wxt-dev/module-svelte` but other package managers don't
Describe the bug
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
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
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.
- https://pnpm.io/ja/cli/dlx
- https://bun.sh/docs/cli/bunx
-
As with npx, bunx will check for a locally installed package first, then fall back to auto-installing the package from npm. Installed packages will be stored in Bun's global cache for future use.
-