withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.65k stars 2.48k forks source link

Blank page on Cloudflare Pages #12203

Closed jamesli2021 closed 3 weeks ago

jamesli2021 commented 3 weeks ago

Astro Info

Astro                    v4.16.1
Node                     v20.17.0
System                   macOS (arm64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/tailwind

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

No response

Describe the Bug

I see blank page after followed this tutorial: deployed to GitHub and Cloudflare build success.

https://logsnag.com/blog/deploy-astro-cloudflare-pages-guide

What's the expected result?

What is the issue if SSR should be straightforward?

Link to Minimal Reproducible Example

https://github.com/jamesli2021/test5

Participation

bluwy commented 3 weeks ago

I'm guessing it's related to a recent regression. Can you try Astro 4.16.0 instead? https://github.com/withastro/astro/issues/12201

jamesli2021 commented 3 weeks ago

Can't test it since npm create astro@4.16.0 command don't work?

Please help test it out? :)

willtemperley commented 3 weeks ago

I just came across this, but with a slightly different setup, I'm using Cloudflare Frameworks beta.

I can confirm using 4.16.0 works, I was getting this error with 4.16.1:

TypeError: Can't modify immutable headers.
    at setOriginHeader (_worker.js:14991:19)
....

@jamesli2021 Just set Astro to the exact version in your package.json:

  "dependencies": {
    "astro": "4.16.0",
  },
jamesli2021 commented 3 weeks ago

@willtemperley Great thanks! 4.16.0 works for me.

bluwy commented 3 weeks ago

Thanks for the update. I'll close this for now in favor of https://github.com/withastro/astro/issues/12201 then. We'll use that issue to track the bug.