qwik: [🐞] from create qwik latest, I can't make cloudflare-pages work since 1.2.14

Which component is affected?

Qwik Runtime

Describe the bug

I am using Windows, Visual Code, from there create qwik latest, pnpm install, then cloudflare-pages adapter, pnpm build, then start. In local, no problem but when transfer to github repo, the cloudflare building do not work at all. The site builds on cloudflare, but once it has build, the site appears completely blank since 1.2.15, then 1.2.16 and now, 1.2.17. I thought that other user would report it and that it would be solved, but it seemed that I am the only one to have that problem therefore may be I have a specific problem, so I decided to put it here.

Reproduction

https://66751608.worktop-qwikcity.pages.dev/

Steps to reproduce

pnpm create latest, pnpm install, then cloudflare-pages adapter, pnpm build, then start.

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Core(TM) i3-4160 CPU @ 3.60GHz
    Memory: 1.75 GB / 7.86 GB
  Binaries:
    Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.8.0 - ~\AppData\Local\pnpm\pnpm.EXE
  Browsers:
    Edge: Spartan (44.19041.3570.0), Chromium (119.0.2151.44)
    Internet Explorer: 11.0.19041.3570
  npmPackages:
    @builder.io/qwik: ^1.2.17 => 1.2.17
    @builder.io/qwik-city: ^1.2.17 => 1.2.17
    undici: ^5.26.0 => 5.27.2
    vite: ^4.4.11 => 4.5.0

Additional Information

No response

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

I’m afraid I don’t understand. I already deployed another Cloudflare site with 1.2.18 from scratch. It worked with npx wrangler pages deploy . I got 47 files uploaded and it worked. With the github repo method, I have 117 files upload instead of 47, and it do not work. So I think I already did what you are asking me to do. If not, precise what you think please.

I figured out the issue, when removing the polyfill I completely forgot that Cloudflare will not update the runtime APIs on older projects by default, and keeps configurable backwards compatibility. This means that any project created before November 2022 that hasn’t been updated to a later compatibility_date will not have the native stream API by default, while new projects do

Huge oversight on my part, and I apologise for any headaches it caused! You can check your compatibility_date setting in the “Settings” -> “Functions” page on the Cloudflare Pages project dashboard

I think the right way forward is probably to only remove the polyfill if it doesn’t exist, that way we use the native API in new projects and projects that want to use the newer features, while keeping backwards compatibility with older ones

Can you try to deploy another Cloudflare site with the same codebase please?

@gioboa sorry to bother you multiple times but OK, I think I have a clue now. I tried pnpm wrangler pages deploy . I got 118 files uploaded instead of 47 with yours. Then I had the same problem. I resumed npx wrangler pages deploy . then it worked again. Can’t explain anything but I think that a clue for solving it.

@gioboa I tried the previous method, but unfortunately got the same result. I reverted to 1.2.14. For information, I tried to bisect, but couldn’t figure out how to. After several unsuccessful tries…