Pages: Failed to publish your Function.

Hi all, just getting this error when trying to deploy an astro ssr (with the cloudflare integration):
Error: Failed to publish your Function. Got error: Uncaught Error: No such module "chunks/prerender_BU2rOQkH.mjs". imported from "renderers.mjs"
I'm not going to lie, I have very little idea where to start or what it's actually complaining about. Would appreciate some advice! *edit: The log in case it helps:
05:44:36.224 ✨ Compiled Worker successfully 05:44:36.272 Found _routes.json in output directory. Uploading. 05:44:36.291 Validating asset output directory 05:44:37.259 Deploying your site to Cloudflare's global network... 05:44:40.757 Uploading... (44/44) 05:44:40.758 ✨ Success! Uploaded 0 files (44 already uploaded) (0.34 sec) 05:44:40.758
05:44:41.187 ✨ Upload complete! 05:44:44.175 Success: Assets published! 05:44:45.813 Error: Failed to publish your Function. Got error: Uncaught Error: No such module "chunks/prerender_BU2rOQkH.mjs". imported from "renderers.mjs"
4 Replies
toon159
toon1592mo ago
same issue 🥹 I somehow fixed the issue by adding client:only="react" to my React components. Downgrading @astrojs/cloudflare to 9.2.1 works for me.
Nick
Nick5w ago
haha, yeah, discovered this yesterday too 😄 Thanks for getting back to me though!
toon159
toon1593w ago
All good 😄 @astrojs/cloudflare v10.2.6 now fixed this issue. I updated just now.
Nick
Nick3w ago
Nice, thanks a lot for the update 🙂