Wrangler deployment fails if functions folder exists

Hi all, I am having some trouble deploying a pages app with a functions directory. If I rename the functions folder so it isn’t included, the static site will deploy just fine. If I include anything in the functions directory it fails. The wrangler cli shows now errors and says it was successful, but the dashboard says the deployment failed with no error messages.
8 Replies
Walshy
Walshy8mo ago
Can you get us a deployment ID
Weldawadyathink
WeldawadyathinkOP8mo ago
Currently my functions folder is just a hello world onRequestGet to make sure there aren’t any JavaScript issues.
Walshy
Walshy8mo ago
?pages-deployment-id
Flare
Flare8mo ago
The Pages deployment ID is a unique build identifier. It's the UUID in the browser bar (for example, a URL would be dash.cloudflare.com/ACCOUNT_ID/pages/view/PROJECT/DEPLOYMENT_ID where the deployment ID looks something like a398d794-7322-4c97-96d9-40b5140a8d9b). This ID can help troubleshoot some issues with Pages builds so if you have a failing build make sure you grab that ID for the Pages team to use.
Weldawadyathink
WeldawadyathinkOP8mo ago
Failed build with a hello world function: f5d832d8-6a23-4c87-b742-c1708b537d39 successful build with no function: 98ce902b-a03f-40bd-8f32-e8a3b396b67b wrangler 3.50.0 installed through pnpm node 18.16.0 Anyone have any idea on this? I don’t need workers paid to use functions on pages, right?
Walshy
Walshy8mo ago
I've raised it for support to check it out Seems like you're missing a compatibility date, you should add that to your wrangler.toml compatibility_date = "2024-04-13" I've raised this as a bug to the wrangler team as well since this should be throwing an error
andreo
andreo8mo ago
I don't believe so. You should be able to utilise it on a Free plan
By default, users have access to the Workers Free plan. The Workers Free plan includes limited usage of Workers, Pages Functions and Workers KV. Read more about the Free plan limits.
- https://developers.cloudflare.com/workers/platform/pricing/
Cloudflare Docs
Pricing · Cloudflare Workers docs
Workers plans and pricing information.
Weldawadyathink
WeldawadyathinkOP8mo ago
I ended up deleting wrangler.toml and deploying with the command line options, and that was successful. When I get back, I’ll test it out with the compatability_date set explicitly in the toml.
Want results from more Discord servers?
Add your server