nuxt-hub / core

Build full-stack applications with Nuxt on CloudFlare, with zero configuration.
https://hub.nuxt.com
Apache License 2.0
986 stars 56 forks source link

Database throwing error #378

Open fl5brkv opened 2 days ago

fl5brkv commented 2 days ago

This is what im getting: "Unexpected error happened 😕 Please download error context and report to our support team". So i downloaded the error and atached it. I just cant see the database in the nuxt devtools, even if the database is working and in the same time, if i deploy it to production/preview, it says that no migrations found even if i have migrations in server/api/database/...sql bug-report.zip

lfglopes commented 1 day ago

Having the same problem since a few hours. In addition I can't run npx nuxt dev --remote.

I get:

ERROR Failed to fetch remote storage: Internal server error

EDIT: I managed to fix it. In my case a server middleware that interacts with the database was messing everything up.

I added the following to the middleware

  const pathname = getRequestURL(event).pathname
  if (pathname.includes('/_nitro/') || pathname.includes('/_hub/')) {
    return
  }

and I'm good to go now...