[{"data":1,"prerenderedAt":392,"buildId":393},["ShallowReactive",2],{"-errors-nuxt-auth-missing-hub-db":3,"-errors-nuxt-auth-missing-hub-db-surround":175,"navigation_docs":186},{"id":4,"title":5,"body":6,"description":164,"extension":165,"links":166,"meta":167,"navigation":169,"path":171,"seo":172,"stem":173,"__hash__":174},"docs\u002F6.errors\u002Fnuxt-auth-missing-hub-db.md","NUXT_AUTH_MISSING_HUB_DB: NuxtHub database alias is missing",{"type":7,"value":8,"toc":159},"minimark",[9,27,32,36,40,43,46,127,134,138,141,155],[10,11,17],"pre",{"className":12,"code":13,"filename":14,"language":15,"meta":16,"style":16},"language-txt shiki shiki-themes one-light synthwave-84 synthwave-84","[NUXT_AUTH_MISSING_HUB_DB] hub:db not found.\n","Example error","txt","",[18,19,20],"code",{"__ignoreMap":16},[21,22,25],"span",{"class":23,"line":24},"line",1,[21,26,13],{},[28,29,31],"h2",{"id":30},"why-this-happens","Why this happens",[33,34,35],"p",{},"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.",[28,37,39],{"id":38},"how-to-fix-it","How to fix it",[33,41,42],{},"Load @nuxthub\u002Fcore before @nuxtjs\u002Fbetter-auth and configure hub.db.",[33,44,45],{},"Configure NuxtHub before the auth module:",[10,47,52],{"className":48,"code":49,"filename":50,"language":51,"meta":16,"style":16},"language-ts shiki shiki-themes one-light synthwave-84 synthwave-84","export default defineNuxtConfig({\n  modules: ['@nuxthub\u002Fcore', '@nuxtjs\u002Fbetter-auth'],\n  hub: { db: 'sqlite' },\n})\n","nuxt.config.ts","ts",[18,53,54,72,99,121],{"__ignoreMap":16},[21,55,56,60,64,68],{"class":23,"line":24},[21,57,59],{"class":58},"sqe1H","export",[21,61,63],{"class":62},"sKg8T"," default",[21,65,67],{"class":66},"sfT9l"," defineNuxtConfig",[21,69,71],{"class":70},"s17Py","({\n",[21,73,75,79,83,86,90,93,96],{"class":23,"line":74},2,[21,76,78],{"class":77},"sYvLG","  modules",[21,80,82],{"class":81},"sVnqq",":",[21,84,85],{"class":70}," [",[21,87,89],{"class":88},"sPAZv","'@nuxthub\u002Fcore'",[21,91,92],{"class":70},", ",[21,94,95],{"class":88},"'@nuxtjs\u002Fbetter-auth'",[21,97,98],{"class":70},"],\n",[21,100,102,105,107,110,113,115,118],{"class":23,"line":101},3,[21,103,104],{"class":77},"  hub",[21,106,82],{"class":81},[21,108,109],{"class":70}," { ",[21,111,112],{"class":77},"db",[21,114,82],{"class":81},[21,116,117],{"class":88}," 'sqlite'",[21,119,120],{"class":70}," },\n",[21,122,124],{"class":23,"line":123},4,[21,125,126],{"class":70},"})\n",[33,128,129,130,133],{},"Install ",[18,131,132],{},"@nuxthub\u002Fcore"," if it is missing. If you use a separate database adapter, remove any hook that forces selection of the NuxtHub provider.",[28,135,137],{"id":136},"verify-the-fix","Verify the fix",[33,139,140],{},"Run pnpm exec nuxt prepare. NuxtHub should register hub:db and the auth module should generate its schema.",[33,142,143,144,149,150,154],{},"See ",[145,146,148],"a",{"href":147},"\u002Fintegrations\u002Fnuxthub","Set up NuxtHub"," or return to the ",[145,151,153],{"href":152},"\u002Ferrors","error reference",".",[156,157,158],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sqe1H, html code.shiki .sqe1H{--shiki-light:#A626A4;--shiki-default:#FEDE5D;--shiki-dark:#FEDE5D}html pre.shiki code .sKg8T, html code.shiki .sKg8T{--shiki-light:#E45649;--shiki-default:#FEDE5D;--shiki-dark:#FEDE5D}html pre.shiki code .sfT9l, html code.shiki .sfT9l{--shiki-light:#4078F2;--shiki-default:#36F9F6;--shiki-dark:#36F9F6}html pre.shiki code .s17Py, html code.shiki .s17Py{--shiki-light:#383A42;--shiki-default:#BBBBBB;--shiki-dark:#BBBBBB}html pre.shiki code .sYvLG, html code.shiki .sYvLG{--shiki-light:#E45649;--shiki-default:#FF7EDB;--shiki-dark:#FF7EDB}html pre.shiki code .sVnqq, html code.shiki .sVnqq{--shiki-light:#0184BC;--shiki-default:#B6B1B1;--shiki-dark:#B6B1B1}html pre.shiki code .sPAZv, html code.shiki .sPAZv{--shiki-light:#50A14F;--shiki-default:#FF8B39;--shiki-dark:#FF8B39}",{"title":16,"searchDepth":74,"depth":74,"links":160},[161,162,163],{"id":30,"depth":74,"text":31},{"id":38,"depth":74,"text":39},{"id":136,"depth":74,"text":137},"Configure NuxtHub before Nuxt Better Auth so the hub:db alias is available.","md",null,{"editPath":168},"diagnostics\u002Fpages.ts",{"title":170},"NuxtHub database alias is missing","\u002Ferrors\u002Fnuxt-auth-missing-hub-db",{"title":5,"description":164},"6.errors\u002Fnuxt-auth-missing-hub-db","PPl_SQ9L2ckrZC19NT8iAm_Mw9IfwZCCyqdFHjg85_s",[176,181],{"title":177,"path":178,"stem":179,"description":180,"children":-1},"Missing auth configuration","\u002Ferrors\u002Fnuxt-auth-missing-config","6.errors\u002Fnuxt-auth-missing-config","Create the server or client auth config file that Nuxt Better Auth could not find.",{"title":182,"path":183,"stem":184,"description":185,"children":-1},"No database provider is enabled","\u002Ferrors\u002Fnuxt-auth-no-database-provider","6.errors\u002Fnuxt-auth-no-database-provider","Restore an enabled module database provider after changing the provider registry.",[187,225,251,298,322,343],{"title":188,"path":189,"stem":190,"children":191,"icon":194},"Getting Started","\u002Fgetting-started","1.getting-started\u002F0.index",[192,195,200,205,210,215,220],{"title":193,"path":189,"stem":190,"icon":194},"Introduction","i-lucide-sparkles",{"title":196,"path":197,"stem":198,"icon":199},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F1.installation","i-lucide-download",{"title":201,"path":202,"stem":203,"icon":204},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F2.configuration","i-lucide-settings",{"title":206,"path":207,"stem":208,"icon":209},"Client Setup","\u002Fgetting-started\u002Fclient-setup","1.getting-started\u002F3.client-setup","i-lucide-monitor",{"title":211,"path":212,"stem":213,"icon":214},"Type Augmentation","\u002Fgetting-started\u002Ftype-augmentation","1.getting-started\u002F4.type-augmentation","i-lucide-type",{"title":216,"path":217,"stem":218,"icon":219},"Schema Generation (NuxtHub)","\u002Fgetting-started\u002Fschema-generation","1.getting-started\u002F5.schema-generation","i-lucide-database",{"title":221,"path":222,"stem":223,"icon":224},"How It Works","\u002Fgetting-started\u002Fhow-it-works","1.getting-started\u002F6.how-it-works","i-lucide-workflow",{"title":226,"path":227,"stem":228,"children":229,"page":250},"Core Concepts","\u002Fcore-concepts","2.core-concepts",[230,234,238,242,246],{"title":231,"path":232,"stem":233},"serverAuth()","\u002Fcore-concepts\u002Fserver-auth","2.core-concepts\u002F1.server-auth",{"title":235,"path":236,"stem":237},"Sessions","\u002Fcore-concepts\u002Fsessions","2.core-concepts\u002F2.sessions",{"title":239,"path":240,"stem":241},"Route Protection","\u002Fcore-concepts\u002Froute-protection","2.core-concepts\u002F3.route-protection",{"title":243,"path":244,"stem":245},"Auto‑Imports and Aliases","\u002Fcore-concepts\u002Fauto-imports-aliases","2.core-concepts\u002F4.auto-imports-aliases",{"title":247,"path":248,"stem":249},"Security & Caveats","\u002Fcore-concepts\u002Fsecurity-caveats","2.core-concepts\u002F5.security-caveats",false,{"title":252,"path":253,"stem":254,"children":255,"page":250},"Guides","\u002Fguides","3.guides",[256,260,265,269,273,277,282,286,290,294],{"title":257,"path":258,"stem":259},"Role‑Based Access","\u002Fguides\u002Frole-based-access","3.guides\u002F1.role-based-access",{"title":261,"path":262,"stem":263,"icon":264},"Setup diagnostics","\u002Fguides\u002Fdiagnostics","3.guides\u002F10.diagnostics","i-lucide-circle-alert",{"title":266,"path":267,"stem":268},"OAuth Providers","\u002Fguides\u002Foauth-providers","3.guides\u002F2.oauth-providers",{"title":270,"path":271,"stem":272},"Custom Database","\u002Fguides\u002Fcustom-database","3.guides\u002F3.custom-database",{"title":274,"path":275,"stem":276},"Database-less Mode","\u002Fguides\u002Fdatabase-less-mode","3.guides\u002F4.database-less-mode",{"title":278,"path":279,"stem":280,"icon":281},"External Auth Backend","\u002Fguides\u002Fexternal-auth-backend","3.guides\u002F5.external-auth-backend","i-lucide-server",{"title":283,"path":284,"stem":285},"Migrating from nuxt-auth-utils","\u002Fguides\u002Fmigrate-from-nuxt-auth-utils","3.guides\u002F6.migrate-from-nuxt-auth-utils",{"title":287,"path":288,"stem":289},"Two-Factor Authentication (TOTP + Backup Codes)","\u002Fguides\u002Ftwo-factor-auth","3.guides\u002F7.two-factor-auth",{"title":291,"path":292,"stem":293},"Testing","\u002Fguides\u002Ftesting","3.guides\u002F8.testing",{"title":295,"path":296,"stem":297},"Production Deployment","\u002Fguides\u002Fproduction-deployment","3.guides\u002F9.production-deployment",{"title":299,"path":300,"stem":301,"children":302,"page":250},"Integrations","\u002Fintegrations","4.integrations",[303,306,310,314,318],{"title":304,"path":147,"stem":305},"NuxtHub","4.integrations\u002F1.nuxthub",{"title":307,"path":308,"stem":309},"DevTools","\u002Fintegrations\u002Fdevtools","4.integrations\u002F2.devtools",{"title":311,"path":312,"stem":313},"Convex","\u002Fintegrations\u002Fconvex","4.integrations\u002F3.convex",{"title":315,"path":316,"stem":317},"i18n","\u002Fintegrations\u002Fi18n","4.integrations\u002F4.i18n",{"title":319,"path":320,"stem":321},"MCP","\u002Fintegrations\u002Fmcp","4.integrations\u002F5.mcp",{"title":323,"path":324,"stem":325,"children":326,"page":250},"API Reference","\u002Fapi","5.api",[327,331,335,339],{"title":328,"path":329,"stem":330},"Composables","\u002Fapi\u002Fcomposables","5.api\u002F1.composables",{"title":332,"path":333,"stem":334},"Server Utilities","\u002Fapi\u002Fserver-utils","5.api\u002F2.server-utils",{"title":336,"path":337,"stem":338},"Components","\u002Fapi\u002Fcomponents","5.api\u002F3.components",{"title":340,"path":341,"stem":342},"Types","\u002Fapi\u002Ftypes","5.api\u002F4.types",{"title":344,"path":152,"stem":345,"children":346,"icon":264},"Errors","6.errors\u002F0.index",[347,349,353,357,361,365,369,373,374,375,376,380,384,388],{"title":348,"path":152,"stem":345},"Overview",{"title":350,"path":351,"stem":352},"Better Auth CLI is not installed","\u002Ferrors\u002Fnuxt-auth-cli-missing","6.errors\u002Fnuxt-auth-cli-missing",{"title":354,"path":355,"stem":356},"Better Auth CLI version does not match better-auth","\u002Ferrors\u002Fnuxt-auth-cli-version-mismatch","6.errors\u002Fnuxt-auth-cli-version-mismatch",{"title":358,"path":359,"stem":360},"Auth configuration failed to load","\u002Ferrors\u002Fnuxt-auth-config-load-failed","6.errors\u002Fnuxt-auth-config-load-failed",{"title":362,"path":363,"stem":364},"Schema generator returned no code","\u002Ferrors\u002Fnuxt-auth-empty-schema","6.errors\u002Fnuxt-auth-empty-schema",{"title":366,"path":367,"stem":368},"Invalid server auth config export","\u002Ferrors\u002Fnuxt-auth-invalid-config-export","6.errors\u002Fnuxt-auth-invalid-config-export",{"title":370,"path":371,"stem":372},"Auth plugin path must be absolute","\u002Ferrors\u002Fnuxt-auth-invalid-plugin-source","6.errors\u002Fnuxt-auth-invalid-plugin-source",{"title":177,"path":178,"stem":179},{"title":170,"path":171,"stem":173},{"title":182,"path":183,"stem":184},{"title":377,"path":378,"stem":379},"Auth schema generation failed","\u002Ferrors\u002Fnuxt-auth-schema-generation-failed","6.errors\u002Fnuxt-auth-schema-generation-failed",{"title":381,"path":382,"stem":383},"Custom session storage is missing","\u002Ferrors\u002Fnuxt-auth-schema-storage-required","6.errors\u002Fnuxt-auth-schema-storage-required",{"title":385,"path":386,"stem":387},"Secondary storage in client-only mode","\u002Ferrors\u002Fnuxt-auth-storage-client-only","6.errors\u002Fnuxt-auth-storage-client-only",{"title":389,"path":390,"stem":391},"Unsupported database dialect","\u002Ferrors\u002Fnuxt-auth-unsupported-dialect","6.errors\u002Fnuxt-auth-unsupported-dialect",1796171226423,"018f2b9d-4f8d-4119-881a-96a677f89188"]