withastro / adapters

Home for Astro's core maintained adapters
47 stars 26 forks source link

Cloudflare + Solid-js hydration / build errors. #263

Closed wkelly17 closed 1 month ago

wkelly17 commented 1 month ago

Astro Info

Astro                    v4.8.4
Node                     v21.5.0
System                   macOS (arm64)
Package Manager          pnpm
Output                   server
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/solid-js

If this issue only occurs in one browser, which browser is a problem?

All

Describe the Bug

Can't run wrangler pages dev ./dist and get a reliable build when a component has any hydration directive that is not client:only="solid-js". The logs say, "✘ [ERROR] Uncaught (in response) TypeError: Cannot set properties of undefined (setting 'noHydrate')". Min repro attached due to same error as reported by a member in discord. In my other project, I had @astrojs/solid-js 4.1.0 , @astrojs/cloudflare 10.2.4, astro 4.8.3 , solid-js 1.8.15. I downgraded to @astrojs/cloudflare 9+, but things reliably broke on any 10+ cloudflare adapter.

Discord link for futher viewing. https://discord.com/channels/830184174198718474/1239920931510554655/1239920931510554655

What's the expected result?

Any hydration directive should build and work.

Link to Minimal Reproducible Example

https://github.com/wkelly17/astro-min-repro

Participation

alexanderniebuhr commented 1 month ago

Duplicate of #224, but I think your reproduction is a good addition to find the issue, so I'm gonna keep it open.

alexanderniebuhr commented 1 month ago

I think I found the upstream issue: https://github.com/solidjs/vite-plugin-solid/issues/153 This should be fixed in solid first, I would recommend trying to get someone on their discord to comment on it: https://publint.dev/solid-js@1.8.17

wkelly17 commented 1 month ago

Ah, thanks. If anyone wants to chip in a few more details on the solid discord, or knows somewhere better to ask than support, here was my start of trying to figure it out there. https://discord.com/channels/722131463138705510/1241033968317632635/1241033968317632635

alexanderniebuhr commented 1 month ago

Duplicate of https://github.com/withastro/adapters/issues/224