Migrated to `wrangler.toml` - getting "Deployment failed" in dashboard

After reading https://blog.cloudflare.com/pages-workers-integrations-monorepos-nextjs-wrangler, I decided to switch my pages deployment to use wrangler.toml. This works great locally (no more passing a bunch of parameters), but when I deploy I get a weird situation.
npx -y wrangler@latest pages deploy site --branch=production --commit-dirty=true
🌍 Uploading... (5/5)

✨ Success! Uploaded 0 files (5 already uploaded) (0.24 sec)

✨ Compiled Worker successfully
✨ Uploading Worker bundle
✨ Deployment complete! Take a peek over at -snip-
npx -y wrangler@latest pages deploy site --branch=production --commit-dirty=true
🌍 Uploading... (5/5)

✨ Success! Uploaded 0 files (5 already uploaded) (0.24 sec)

✨ Compiled Worker successfully
✨ Uploading Worker bundle
✨ Deployment complete! Take a peek over at -snip-
However, the dashboard shows Deployment failed, without any further information.
No description
1 Reply
Niek
Niek•7mo ago
i guess one option would be to remove the complete page and re-create from scratch, but that would be far from ideal a manual "upload folder" in the dashboard with the output dir still works fine. so it must be some compatibility issue in the new wrangler.toml support found it! the issue was a secret token that was set in wrangler.toml as a public env var. moving it to .dev.vars fixed it still would be nice if it's possible to debug deployment failures 🙂
Want results from more Discord servers?
Add your server