Errors
NUXT_AUTH_MISSING_HUB_DB: NuxtHub database alias is missing
Configure NuxtHub before Nuxt Better Auth so the hub:db alias is available.
Example error
[NUXT_AUTH_MISSING_HUB_DB] hub:db not found.
Why this happens
The module selected the NuxtHub database provider, but NuxtHub had not registered the hub:db alias. Check module order, hub.db, and any custom provider hooks that force the nuxthub provider.
How to fix it
Load @nuxthub/core before @nuxtjs/better-auth and configure hub.db.
Configure NuxtHub before the auth module:
nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxthub/core', '@nuxtjs/better-auth'],
hub: { db: 'sqlite' },
})
Install @nuxthub/core if it is missing. If you use a separate database adapter, remove any hook that forces selection of the NuxtHub provider.
Verify the fix
Run pnpm exec nuxt prepare. NuxtHub should register hub:db and the auth module should generate its schema.
See Set up NuxtHub or return to the error reference.