-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error during build - Rollup Error: could not resolve accordion-context-id from accordion-context-error #453
Comments
OK I found one issue that is happenning with the TS types, they are being generated before the But this needs further investigation |
Yes I think the problem doesn't come from the Accordion component. I simply copied the Accordion code into the qwik-ui-accordion-repro and it builds as expected. I also tried publishing an npm library with just the accordion (called qwik-ui-lib-test) and I can make it work too with the basic template (https://qwik.builder.io/docs/advanced/library/). You can try this out in the repro on the "no-qwik-ui" branch I just pushed. So my guess is that the problem comes from the new viteconfig or tsconfig. |
The reason is that the optimizer changes the import location when converting the component to a QRL. |
I believe this was resolved in QwikDev/qwik#5375 and can be closed. |
Using v0.1.17, my builds and previews fail with the following error:
Repro
Link: https://github.com/maiieul/qwik-ui-rollup-accordion-repro (not the most minimal but I doubt tailwind is the issue in here.. Might be worth trying without it if we don't find what's going on)
(it's easier to read with npm)
You should get the error.
Try removing the Accordion component, and you'll still get the error (remember to re-run the preview), even though there are no Accordion components imported in the project anymore, but qwik-ui is still being used by the Separator component.
Re-add that Accordion component and try removing the Separator component. You'll still get the same accordion error (remember to re-run the preview).
Remove both components and the error is gone.
Potential reasons
Discussion with the Jack Shelton @thejackshelton makes us think it could be due to the two contexts on the Accordion component (defined in accordion-context-id.ts), or related to the big bundle issue Shai @shairez has just resolved.
The text was updated successfully, but these errors were encountered: