Cloudflare adapter failing to publish function, failed to delete unused files from server bundle #257
Labels
- P4: important
Violate documented behavior or significantly improves performance (priority)
needs repro
Issue needs a reproduction
pkg: cloudflare
upstream
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Unable to deploy to cloudflare after switching from static to hybrid rendering with cloudflare adapter.
When deploying I get this error at the very end of the deployment process after upload to cloudflare network completes in log, failing the deployment:
When building my project locally, I now get these errors suggesting files were unable to be deleted from server bundle:
Everything worked perfectly when using static generation without cloudflare adapter.
Background on my project
It's an Astro app with a GPT Chat page that uses a cloudflare function to communicate with OpenAI.
This all worked well in static mode. But I wanted to stop using the cloudflare function and switch my site to hybrid mode to handle api communication through a route in Astro.
I switched to hybrid mode and was able to get everything working in dev mode, the route.ts was successfully handling API communication. But when trying to build locally, and deploy to cloudflare I got the above errors.
I tried deleting the function, but that didn't change anything, I still get the error that the function failed to be published even though the function no longer existed. There must be something else causing this error?
What's the expected result?
Should be able to build and deploy without issue.
Link to Minimal Reproducible Example
Minimal reproduction added. I created a new project, added cloudflare adapter, then created a minimal React button component. Adding the React component reproduced this error.
https://stackblitz.com/github/avgvstvs96/astroMinimalRepro
Build Log
Here's a copy of the full build log:
Participation
The text was updated successfully, but these errors were encountered: