Automatic provisioning issue

Hey, folks. I tried running the below with my wrangler.jsonc doing automatic provisioning (no database_id) and got this error.

$ npx wrangler d1 execute DB --file=init.sql

 ⛅️ wrangler 4.54.0
───────────────────
Resource location: local 

Use --remote if you want to access the remote instance.

✘ [ERROR] Couldn't find a D1 DB with the name or binding 'DB' in your wrangler.json file.


I'm assuming this is just that the beta for automatic provisioning hasn't made it to this portion of the wrangler code since database_id is still listed as required in the D1 section of the Workers config docs.

Once I manually created the d1 instance and got that database_id into the config file, it did its magic.

I am still confused when the automatic provisioning is meant to be triggered. I had to manually run the wrangler command to create the database even though I'm running the Vite plugin, so it is running Workers that way, and tried an
npx wrangler dev
since I saw something about dev mode possibly triggering it. Or do I just misunderstand how automatic provisioning is meant to work?
Was this page helpful?