Skip to content

Setup Troubleshooting

Terminal window
wrangler login
wrangler whoami
pnpm run setup

A database, bucket or Worker name already exists

Section titled “A database, bucket or Worker name already exists”

Setup asks for a different name. It never overwrites another deployment’s resources in your account. Accept the suggested name or type your own.

Check the D1 binding in the root wrangler.toml. For an existing deployment it must contain the real database_id. Do not replace it with the repository’s placeholder. If a merge overwrote it, recover the value from history:

Terminal window
git log -p -- wrangler.toml

Do not re-run setup to recover it: that provisions new resources instead.

If wrangler tail shows an error about the auth secret, BETTER_AUTH_SECRET is missing. Set it:

Terminal window
wrangler secret put BETTER_AUTH_SECRET