withastro / adapters

Home for Astro's core maintained adapters
69 stars 40 forks source link

Cloudflare deployment error after all assets have been uploaded @astrojs/cloudflare 10.2.0 #239

Closed lumintulogic-admin closed 6 months ago

lumintulogic-admin commented 6 months ago

Astro Info

Astro                    v4.6.3
Node                     v20.12.2
System                   Linux (x64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/sitemap

Describe the Bug

When deploying in cloudflare, deployment failed at the last stage, after all the assets have been successfully uploaded

2024-04-21T14:57:51.544098Z Uploading... (122/122)
2024-04-21T14:57:51.544756Z ✨ Success! Uploaded 0 files (122 already uploaded) (0.30 sec)
2024-04-21T14:57:51.544952Z 
2024-04-21T14:57:51.845128Z ✨ Upload complete!
2024-04-21T14:57:54.075874Z Success: Assets published!
2024-04-21T14:57:55.996116Z Error: Failed to publish your Function. Got error: Uncaught ReferenceError: _page2 is not defined
  at bundledWorker-0.21381334859200396.mjs:2120:44

I tried reverting back to @astrojs/cloudflare 10.1.0 and the deployment successfully finished. All the functions, middlewares, and workers work perfectly without a hitch. As soon as I upgraded it back to 10.2.0, the problem persists.

What's the expected result?

Finish the deployment successfully with the latest version of cloudflare adapter.

Link to Minimal Reproducible Example

You have to deploy to cloudflare to reproduce it

Participation

alexanderniebuhr commented 6 months ago

duplicated of https://github.com/withastro/adapters/issues/237