Cloudflare Pages preview deployment fails with D1 binding error

For the past week, all of my preview deployments have failed with the following message:
Error: Failed to publish your Function. Got error: binding db of type d1 must have a database that already exists. Use wrangler or the UI to create the database.

This error only occurs on one project and creating a new project with git integration with a duplicate repo works fine. I’ve gone through the project settings and everything matches.

I don’t use D1 in any of projects.

I’m just really confused as to what could be causing this issue and if it’s possible to rectify without deleting this project and starting fresh.


What’s your

Thanks for following up.

The project name is: culturerotband. The deployment id for the non-main branch that’s identical to the main branch is: 8afb069a-802d-47ef-a0b0-f8f0e1cd8404


I can confirm the D1 binding is definitely there. You seem to have hit a bug in the UI where you no longer have D1 DBs so we don’t show the attached bindings.
Create a D1 DB temporarily ( and then go back to the dashboard and check the “Preview” tab of D1. That should then allow you to remove it,

Apologies for that, I’ll make sure we get that fixed up.

Thank you so much Walshy!

That worked like a charm - all resolved.

Thank you again.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.