Deployment logs to understand `Status: Failed`?

I have some deployments via wrangler pages deploy that in theory should work (they work fine locally via wrangler dev), but after deploy I only see Status: Failed in the web UI for that deployment. I could not find any deployment logs. Am I overlooking something?
23 Replies
Erisa
Erisa•11mo ago
?pages-deployment-id
Flare
Flare•11mo 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.
Erisa
Erisa•11mo ago
Could you share an affected deployment id?
Jan Piotrowski (janpio)
Yes, 431017f6-4972-4770-8bc3-ba4050ffccfb for example.
Jan Piotrowski (janpio)
Looks like this in the UI for me:
No description
Jan Piotrowski (janpio)
I could not find any more information why it says Status: Failed on the top right. The preview URL just shows a timeout: https://431017f6.pg-cfpages-basic.pages.dev/
Erisa
Erisa•11mo ago
Sorry for the lack of visibility here, I know that the team are working to improve this experience with some errors on direct uploads. The error I see on the internal logs is No such compatibility flag: node_compat I would guess you meant nodejs_compat? https://developers.cloudflare.com/workers/runtime-apis/nodejs/#enable-nodejs-from-the-cloudflare-dashboard
Jan Piotrowski (janpio)
I meant node-compat actually, the one where polyfills are used during build. But thanks for surfacing this - it would be amazing if this was visible in the UI. Is there an issue to upvote or something to express my interest in that? Now that I know what I messed up before, I could fix it. I ran the correct command (with - instead of _) but am still getting a failed deploy. Could you please take another look at 0c6516ce-c773-4649-8a6a-6851de5d53b4? Thanks!
Erisa
Erisa•11mo ago
The same - No such compatibility flag: node_compat Let me be clearer: The one that is a compatability flag is nodejs_compat The one that adds polyfills during build is node_compat = true in wrangler.toml and is NOT compatible with Pages as Pages does not use a wrangler.toml
Jan Piotrowski (janpio)
Yeah sorry, I have to explain a bit more for this to make sense: I understand the difference between node_compat and nodejs_compat. I also had to learn about the wrangler pages commands and Pages in general not supporting wrangler.toml 😢 But: wrangler pages dev has an (mostly undocumented) CLI flag --node-compat which triggers it to use node_compat under the hood (as replacement for missing wrangler.toml support). I need to set that flag to be able to deploy the app I am building right now as it uses the pg node library, which needs the polyfills unfortunately. There is a PR that adds --node-compat to wranger pages deploy as well: https://github.com/cloudflare/workers-sdk/pull/2541 I am using that to deploy that app. So I am definitely outside of the normal paths, trying to figure out what works and what does not. Now the weird bit: Using wrangler pages deploy --node-compat works on one of my accounts, but not on the other one (the one where I asked about figuring out the build command). (Here is for example a deployment ID where this worked: 7d6182cc-de73-44c6-9f4b-e10373ee5da7)
GitHub
Add --node-compat to Pages publish by WalshyDev · Pull Request #254...
What this PR solves / how to test: This adds --node-compat support to Pages, this is a common feature request and will allow for the usage of Stripe and other such libs within Functions. Associated...
Erisa
Erisa•11mo ago
Right okay that does make more sense, though I should note the one these errors are complaining about is something that is set in the project settings. Could you check what you have for compatibility settings in the project dashboard?
Jan Piotrowski (janpio)
That would make total sense! I probably played with these when setting things up. Checking now.
Erisa
Erisa•11mo ago
I would expect that error if you did something like this
No description
Jan Piotrowski (janpio)
D'oh, I set node_compat as a compatiblity flag in the project where it is failing and forgot to remove it. So it's not even the value from the CLI. 🫥 Validation of these values would be nice.
Erisa
Erisa•11mo ago
It's really rough experrience that we don't expose this deploy error for direct uploads or, as you say, validate those values on submission. #pages-feature-suggestions would be the best place to mention that concern, but I'll also pass it on internally when the weekend is over (Support works weekends but the rest of the company doesnt unless theres a big problem)
Jan Piotrowski (janpio)
Definitely not a big problem. Just a bit of confusion.
Erisa
Erisa•11mo ago
Yeah makes sense, sorry for the trouble and thanks for letting us know
Jan Piotrowski (janpio)
node_compat removed, still failing deployment: 3fa85801-f4d3-40c4-aa9a-eeffe802c7d6
Erisa
Erisa•11mo ago
Lemme check Ah Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_large)
Jan Piotrowski (janpio)
YES, that makes sense then - it's a free account. Thank you so much. My world fits together again.
Erisa
Erisa•11mo ago
Indeed, Workers Paid would bump that to 10 MiB No problem!
Erisa
Erisa•11mo ago
Thank you!
Want results from more Discord servers?
Add your server