qwik
qwik copied to clipboard
`Cannot find package 'vite'` (when using pnpm)
Qwik Version
0.0.39
Operating System (or Browser)
macOS
Node Version (if applicable)
18.3
Which component is affected?
Starters / CLI
Expected Behaviour
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from /xxx/node_modules/.pnpm/@[email protected]/node_modules/@builder.io/qwik/optimizer.mjs
at new NodeError (node:internal/errors:377:5)
at packageResolve (node:internal/modules/esm/resolve:910:9)
at moduleResolve (node:internal/modules/esm/resolve:959:20)
at defaultResolve (node:internal/modules/esm/resolve:1174:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:605:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:318:18)
at ESMLoader.import (node:internal/modules/esm/loader:404:22)
at importModuleDynamically (node:internal/modules/esm/translators:106:35)
at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14)
at sys.strictDynamicImport.sys.dynamicImport (file:///xxx/node_modules/.pnpm/@[email protected]/node_modules/@builder.io/qwik/optimizer.mjs:501:57)
Actual Behaviour
No error.
Additional Information
Relies on hoisting. @builder.io/qwik should depend explicitly on vite as a peer dep.
can you submit a PR?
@vjpr May I ask how have you dealt with this? Pulling hairs right now
https://pnpm.io/package_json#pnpmpackageextensions
See additional info above for the deps to add.
Thank you very much! My problem is that vite is installed, but one of its plugins can't find it o.0
Hi @vjpr
Gave it a spin with 0.12.0 and didn't discover any issue like this. Do you still have any issues or could this be closed?
@vjpr did you have time to dbl check it on your end? i'd suggest to close the issue by now and create a new one if needed? cc @shairez 🙏
yeah I think pnpm works now seamlessly
thanks for the ping (and triaging) @zanettin closing
@vjpr feel free to reopen / recreate if it happens again thanks for the report!