For some reason I am not able to access my db from the binding?
For some reason I am not able to access my db from the binding?
console.log(env); shows {__D1_BETA__BAR: Fetcher, __D1_BETA__DB: Fetcher, __D1_BETA__FOO: Fetcherconsole.log(env.BAR); shows Fetcher {}const { success } = await env.bbtrack.prepare(Inserting Failed TypeError: Cannot read properties of undefined (reading 'prepare')env.bbtrack is defined it just is not a D1Database somehow ?npm create cloudflare@latest and npx wrangler init? I don't get why there are 2 seperate CLI's for initializing projects


package.json file it will be available to the worker/functionnew WebSocket() and it tells me "Websockets obtained from the 'new WebSocket()' constructor cannot call accept", so I call .accept(), but it then tells me "You must call one of accept() or state.acceptWebSocket() on this WebSocket before sending messages.". It's making me crazy.api worker, which then calls an auth service binding, would I be billed for 1 request or 2?console.log(env);{__D1_BETA__BAR: Fetcher, __D1_BETA__DB: Fetcher, __D1_BETA__FOO: Fetcherconsole.log(env.BAR);Fetcher {}const { success } = await env.bbtrack.prepare(Inserting Failed TypeError: Cannot read properties of undefined (reading 'prepare')env.bbtracknpx wrangler initnew WebSocket().accept()