Open mklueh opened 16 hours ago
Hmm, yeah, looks like yarn 4.5 just doesn't work with the latest version.
yarn
With @wxt-dev/module-vue
:
$ cat /private/var/folders/g2/ztr_kd996gv4vv11lxwggz8c0000gn/T/xfs-6cd13a85/build.log
# This file contains the result of Yarn building a package (wxt-starter@workspace:.)
# Script name: postinstall
WXT 0.19.11
ℹ Generating types...
file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2102
const error = new Error(
^
Error: Cannot find module wxt/client imported from file:///Users/aklinker1/Development/local/wxt-issue-1058, file:///Users/aklinker1/Development/local/, file:///Users/aklinker1/Development/local/wxt-issue-1058/_index.js, file:///Users/aklinker1/Development/local/node_modules
at _resolve (file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2102:19)
at resolveSync (file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2111:10)
at resolvePathSync (file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2121:24)
at resolvePath (file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2125:28)
at resolvePackageJSON (file:///Users/aklinker1/.yarn/berry/cache/pkg-types-npm-1.2.1-fd28245c53-10c0.zip/node_modules/pkg-types/dist/index.mjs:103:52)
at extractExports (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:289:33)
at resolvePackagePreset (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:271:25)
at resolvePreset (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1196:18)
at file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1220:18
at Array.map (<anonymous>)
at resolveBuiltinPresets (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1216:46)
at createInternalContext (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1340:20)
at createUnimport (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1226:15)
at file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/builtin-modules/unimport.mjs:21:20
at callEachWith (file:///Users/aklinker1/.yarn/berry/cache/hookable-npm-5.5.3-82b0342097-10c0.zip/node_modules/hookable/dist/index.mjs:68:5)
at file:///Users/aklinker1/.yarn/berry/cache/hookable-npm-5.5.3-82b0342097-10c0.zip/node_modules/hookable/dist/index.mjs:205:11
at <anonymous>
at async registerWxt (file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/core/wxt.mjs:39:3)
at async prepare (file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/core/prepare.mjs:5:3)
at async file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/cli/commands.mjs:76:5
at async CAC.<anonymous> (file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/cli/cli-utils.mjs:16:22)
at async file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/cli/index.mjs:11:1 {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v18.20.3
Without it:
$ cat /private/var/folders/g2/ztr_kd996gv4vv11lxwggz8c0000gn/T/xfs-87e7677c/build.log
# This file contains the result of Yarn building a package (wxt-starter@workspace:.)
# Script name: postinstall
WXT 0.19.11
ℹ Generating types...
file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2102
const error = new Error(
^
Error: Cannot find module wxt/client imported from file:///Users/aklinker1/Development/local/wxt-issue-1058, file:///Users/aklinker1/Development/local/, file:///Users/aklinker1/Development/local/wxt-issue-1058/_index.js, file:///Users/aklinker1/Development/local/node_modules
at _resolve (file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2102:19)
at resolveSync (file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2111:10)
at resolvePathSync (file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2121:24)
at resolvePath (file:///Users/aklinker1/.yarn/berry/cache/mlly-npm-1.7.2-dbf2e47745-10c0.zip/node_modules/mlly/dist/index.mjs:2125:28)
at resolvePackageJSON (file:///Users/aklinker1/.yarn/berry/cache/pkg-types-npm-1.2.1-fd28245c53-10c0.zip/node_modules/pkg-types/dist/index.mjs:103:52)
at extractExports (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:289:33)
at resolvePackagePreset (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:271:25)
at resolvePreset (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1196:18)
at file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1220:18
at Array.map (<anonymous>)
at resolveBuiltinPresets (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1216:46)
at createInternalContext (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1340:20)
at createUnimport (file:///Users/aklinker1/.yarn/berry/cache/unimport-npm-3.13.1-0226725ef1-10c0.zip/node_modules/unimport/dist/shared/unimport.1c7b6182.mjs:1226:15)
at file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/builtin-modules/unimport.mjs:21:20
at callEachWith (file:///Users/aklinker1/.yarn/berry/cache/hookable-npm-5.5.3-82b0342097-10c0.zip/node_modules/hookable/dist/index.mjs:68:5)
at file:///Users/aklinker1/.yarn/berry/cache/hookable-npm-5.5.3-82b0342097-10c0.zip/node_modules/hookable/dist/index.mjs:205:11
at <anonymous>
at async registerWxt (file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/core/wxt.mjs:39:3)
at async prepare (file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/core/prepare.mjs:5:3)
at async file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/cli/commands.mjs:76:5
at async CAC.<anonymous> (file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/cli/cli-utils.mjs:16:22)
at async file:///Users/aklinker1/Development/local/wxt-issue-1058/.yarn/__virtual__/wxt-virtual-1da7d21582/4/.yarn/berry/cache/wxt-npm-0.19.11-89f86a5551-10c0.zip/node_modules/wxt/dist/cli/index.mjs:11:1 {
code: 'ERR_MODULE_NOT_FOUND'
}
Node.js v18.20.3
Didn't get your exact error, but things obviously don't work.
I don't know enough about yarn berry, but you could try using it in pnpm
mode as a workaround?
Hello,
I've tried pnpm as well as pnp modes.
pnpm fails with an obsucre linking issue regarding the shiki package while the pnp issue now shifts the problem to the nuxt package
https://github.com/nuxt/cli/issues/217#issuecomment-2084624223
Describe the bug
So my overall setup is Nx, Yarn Berry 4.5.0 and GitHub Actions for CI.
I've installed wxt and @wxt-dev/vue locally, as dev dependencies and on my PC everything works as expected.
In the CI however the yarn install command fails with
My first idea was to expose the contents of
node_modules/.bin
as ENV variables withBut this doesn't make sense, as it fails during the install command and this would only run afterwards. I guess it's mainly the prepare command that is called during install and immediately fails.
I've tried to install wxt globally as a backup solution, leading to another error
Not sure if this is related to Yarn, but I'd appreciate any help.
Reproduction
Not easily reproducible
Steps to reproduce
No response
System Info
Used Package Manager
yarn
Validations