cloudflare-d1-backup icon indicating copy to clipboard operation
cloudflare-d1-backup copied to clipboard

Getting an error

Open dinpd opened this issue 2 years ago • 2 comments

throw new Error(`D1 Error: ${body.errors ^

Error: D1 Error: Could not route to /client/v4/accounts/undefined/d1/database/undefined/query, perhaps your object identifier is invalid? at fetchD1 (file:///Users/danitkis/.npm/_npx/9d37dc0424d96159/node_modules/@cretezy/cloudflare-d1-backup/dist/index.js:22:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async createBackup (file:///Users/danitkis/.npm/_npx/9d37dc0424d96159/node_modules/@cretezy/cloudflare-d1-backup/dist/index.js:30:26) at async file:///Users/danitkis/.npm/_npx/9d37dc0424d96159/node_modules/@cretezy/cloudflare-d1-backup/dist/cli.js:30:16

dinpd avatar Dec 26 '23 15:12 dinpd

@dinpd Are you sure you have set the following three things correctly? The error message seems to be undefined

CLOUDFLARE_D1_ACCOUNT_ID CLOUDFLARE_D1_DATABASE_ID CLOUDFLARE_D1_API_KEY

t0m0120 avatar Jan 01 '24 06:01 t0m0120

For some reason it didn't work with env vars for me (like on the example) but setting the values on the .env file worked just fine!

kr105 avatar Mar 04 '24 03:03 kr105