mort
mort
CDCloudflare Developers
Created by mort on 11/15/2023 in #pages-help
Error deploying pages project to preview environment
I'm using Cloudflare Pages to host a SvelteKit project, using @sveltejs/adapter-cloudflare and Git Integration. Whenever a non-main branch is published/updated, I get the following error on the Preview Deployment Build Log:
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.
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.
Most recently on deployment id: 0ca9aba3-eea8-4f2f-86c6-d9896b55328d - This code is identical to the current production deployment that's running just fine, just the result of creating a new branch in GitHub. The project settings appear to be identical between the production and preview branches. I'm not using d1, my SvelteKit project does not contain a wrangler file, and there aren't any bindings in the project settings. I get zero errors when building locally and running
wrangler pages dev .svelte-kit/cloudflare
wrangler pages dev .svelte-kit/cloudflare
The last preview deployment that was successful was aa5a2e15-4bc1-4f40-a685-fd5297f5fa25, from 9 days ago.
4 replies