command to start local dev: npm run dev (next dev)
in app: const results = await env.D1.prepare("SELECT * FROM users").all();
fails with: Cause: Error: no such table: users at D1Database._sendOrThrow (cloudflare-internal:d1-api:67:24) at async D1PreparedStatement.all (cloudflare-internal:d1-api:181:46) { [cause]: undefined } ⨯ Error: D1_ERROR: no such table: users at async Page (page.tsx:37:21) digest: "1859585598" Cause: Error: no such table: users at D1Database._sendOrThrow (cloudflare-internal:d1-api:67:24) at async D1PreparedStatement.all (cloudflare-internal:d1-api:181:46) { [cause]: undefined } GET / 500 in 3152ms
in the docs, i see that there's a way to pass the --d1 flag when using wrangler pages dev, but that's not compatible with next dev, so not sure what to do
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
CD
Cloudflare Developers
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news