Open mhuretski opened 3 months ago
This has to do with qwik-nx. cc @shairez @dmitry-stepanenko.
Removing the qwikNxVite plugin "solves" the problem for the time being.
Code in question that's throwing here:
for (const qwikPlugin of qwikPlugins) {
// it's not expected to have the plugin duplicated, but handling it as an edge case
const pluginOptions = qwikPlugin.api.getOptions();
console.log(pluginOptions);
console.log(qwikPlugin);
const vendorRoots = yield (0, get_vendor_roots_1.getVendorRoots)(options, pluginOptions);
pluginOptions.vendorRoots.push(...vendorRoots);
}
pluginOptions doesn't have a vendorRoots array. I don't know if the solution is to default to an empty array or if none of this makes sense anymore?
pluginOptions.vendorRoots = (pluginOptions.vendorRoots ?? []).push(...vendorRoots);
I saw a load of pathing improvements added recently by wmorten relating to nx projects etc, is the qwikNx plugin still required? I feel like I have storybook issues without it but I'm not sure it's all related. My nx project is a little sensitive to package updates and sometimes wish I just used qwik CLI on it's own but think it doesn't support multiple apps/libs?
From what we've seen, you can simply remove the qwikNxVite plugin from now on, qwik natively supports monorepos. @dmitry-stepanenko is working on a release.
Which component is affected?
Qwik Runtime
Describe the bug
qwik 1.8.0 doesnt work with NX monorepo
Reproduction
https://github.com/mhuretski/qwik-monorepo
Steps to reproduce
pnpm dlx create-nx-workspace@latest org-workspace --preset=qwik-nx
1.8.0
npx nx run PROJECT_NAME:serve
where PROJECT_NAME - name of the created project (in attached reponpx nx run test:serve
)System Info
Additional Information
If Qwik is downgraded to
1.7.3
everything works just fine.