Trying to setup a d1 database on the remote worker with the following command: `npx wrangler d1 cre

Trying to setup a d1 database on the remote worker with the following command:

npx wrangler d1 create test


results in

[ERROR] Cannot read properties of undefined (reading 'map')


Using the --local flag works however.

In my wrangler.tml I have:

[[d1_databases]]
binding = "DB"
database_name = "name-of-db"
database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"


What am I doing wrong?

EDIT:
Oops. Turned out I'd been signed out of cloudflare and I needed to run
npx wrangler login
again. Odd because it was still letting me deploy. A better error message would have been helpful.
Was this page helpful?