Help With Nuxt Hub Database

I am using the Nuxt Hub database in my app, but am getting a "Server Error" when trying to execute a query using db.prepare('SELECT * FROM accounts WHERE email=?1').bind(body.email).all() (db is the hubDatabase()) More info on stack overflow
Stack Overflow
Using hubDatabase prepare function throws server error
I am building an app using Nuxt 3 and deploying it to Nuxt Hub. I am using the provided database that comes with Nuxt Hub. Inside an api endpoint in the server folder, I runa query with the database
2 Replies
kapa.ai
kapa.ai2d ago
Hi @Eli Sterken. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- I'm sorry, but the knowledge sources provided do not contain specific information about troubleshooting the "Server Error" when using the Nuxt Hub database with db.prepare('SELECT * FROM accounts WHERE email=?1').bind(body.email).all() or the hubDatabase() function. The documentation does confirm that NuxtHub uses a Cloudflare D1 database by default and that you can override the configuration in your nuxt.config.ts, but it does not detail the usage or error handling for db.prepare or hubDatabase() specifically Deploy to NuxtHub. If you continue to encounter issues, I recommend checking the official NuxtHub documentation or seeking help from the Nuxt community, as suggested in the Getting Help guide. Be sure to provide a minimal reproduction and any relevant error logs to get more targeted assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2d ago
<@1243390210897612877> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?