-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Cloudflare v10 + Solid breaks some components and scripts #224
Comments
@MehrdadKhnzd Thank you trying to reproduce everything, could you update the permissions on the repo, I can't open it. |
Sorry, I fixed the permissions. |
@MehrdadKhnzd Please try |
@alexanderniebuhr Now the build fails, both locally and on Cloudflare. |
@MehrdadKhnzd sorry for that, the build was corrupted.. can you try |
@alexanderniebuhr No, it didn't solve any of the problems. |
Thank you for testing, for now I can only reproduce the |
I had also this problem in my project. Now with setting the version to
Repro: https://github.com/lindner-development/website/tree/improvements |
Thanks for adding context, we're trying to find a fix. This is probably also upstream caused, so we need to make sure we fix it at the right place. |
not sure if this is related: going back to 9.2.1 resolves the issue |
Yeah that was my initial error, but that got solved using the next minor versions. Now I get this build time error. |
@alexanderniebuhr Do you have any update on this? |
We're still working on investigation, I also marked this issue as |
Have there been any clues in the meantime as to how the problem could be fixed?
What seems to be the problem in the core? |
There are some workarounds in all the related issues. I didn't find a solution to ship by default, but this is high priority. The issue in core is that the generated code gets modified at the end, which leads to imports which don't exist after that modification. |
@deeprobin @MehrdadKhnzd sorry that this is still not fixed, I'm taking another try at this. Can you please try this version: Does this fix all the issues you are seeing with Solid? |
@alexanderniebuhr Thanks for trying. None of the issues are resolved. |
Strange, I can't reproduce them anymore, we keep trying |
@alexanderniebuhr I tested the version also. So first of all I need to find another headless CMS. |
I think I found the upstream issue: solidjs/vite-plugin-solid#153 |
I don't expect this to be fixed by v11, but might be worth to try again. |
@alexanderniebuhr It's still not fixed, and the bigger problem is that even v8.1.0 no longer works. I made some structural changes in my app, and now when I use v8.1.0, which was the latest working version without breaking routes and Solid.js, it continues to create overlapping routes, preventing deployment on Cloudflare. I'm completely out of options and unable to deploy a new version. I hope you have a solution. |
This is still an upstream bug, I haven't found a solution to make it work in general. There are some workarounds posted in all the issues here and in the upstream repository, maybe they might help you |
Among all the solutions, the only effective method that worked without side effects was patching Solid.js and removing the |
I guess our only hope for a fix can only be done from the Solid side. So far I am relying on the temporary workaround suggested in the upstream issue.
|
@alexanderniebuhr - Solid 1.9 fixed my errors (deploy Pages site and wrangler preview) based on the fix to package.json in above PR. Anyone else following this want to test if your issues resolve? |
@wkelly17 I have currently the problem, that I use another dependency which uses |
[ERROR] ReferenceError: Cannot access 'page' before initialization "astro": "^4.16.7", |
Astro Info
Describe the Bug
When I deployed my web app using the new Cloudflare adapter, the functionality of many components and pages became broken.
For many components, it acts like I haven't added
client:load
at all - just rendering the component in a static form without having any functionality. Surprisingly, it worked for a few others. I'm still not sure about the exact situation causing it.Also, it doesn't render the pages that have
onMount
in them. It just outputs blank.What's the expected result?
All of them should work properly. In the minimal reproduction, you can see how using
onMount
makes the rendering blank. You can also commentonMount
on theBtn.tsx
component to see how it renders. I still don't have a concrete example of when the component becomes static and doesn't do anything, but I will add it here if I can.Link to Minimal Reproducible Example
https://stackblitz.com/~/github.com/MehrdadKhnzd/astro-bug-reproduction
Participation
The text was updated successfully, but these errors were encountered: