[{"data":1,"prerenderedAt":335,"buildId":336},["ShallowReactive",2],{"-errors-nuxt-auth-empty-schema":3,"-errors-nuxt-auth-empty-schema-surround":118,"navigation_docs":129},{"id":4,"title":5,"body":6,"description":107,"extension":108,"links":109,"meta":110,"navigation":112,"path":114,"seo":115,"stem":116,"__hash__":117},"docs\u002F6.errors\u002Fnuxt-auth-empty-schema.md","NUXT_AUTH_EMPTY_SCHEMA: Schema generator returned no code",{"type":7,"value":8,"toc":101},"minimark",[9,27,32,36,40,43,50,73,76,80,83,97],[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_EMPTY_SCHEMA] Schema generation returned empty result for sqlite\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",{},"Better Auth's Drizzle schema generator returned an empty result for the selected dialect. There is no schema code for the module to write, so setup stops.",[28,37,39],{"id":38},"how-to-fix-it","How to fix it",[33,41,42],{},"Check the Better Auth plugins and database options in defineServerAuth(), then regenerate the schema.",[33,44,45,46,49],{},"Check recent changes to ",[18,47,48],{},"defineServerAuth()",", especially plugin schema definitions and database options. In a development branch, isolate plugin configuration changes and rerun preparation after each change:",[10,51,55],{"className":52,"code":53,"language":54,"meta":16,"style":16},"language-bash shiki shiki-themes one-light synthwave-84 synthwave-84","pnpm exec nuxt prepare\n","bash",[18,56,57],{"__ignoreMap":16},[21,58,59,63,67,70],{"class":23,"line":24},[21,60,62],{"class":61},"siqUp","pnpm",[21,64,66],{"class":65},"sI3kV"," exec",[21,68,69],{"class":65}," nuxt",[21,71,72],{"class":65}," prepare\n",[33,74,75],{},"If a minimal config still returns no code, report the diagnostic code, dialect, Better Auth version, and a minimal reproduction. Preserve the last working schema while investigating.",[28,77,79],{"id":78},"verify-the-fix","Verify the fix",[33,81,82],{},"Preparation should produce a non-empty schema with the auth tables expected for your configuration. Review the generated code before applying migrations.",[33,84,85,86,91,92,96],{},"See ",[87,88,90],"a",{"href":89},"\u002Fgetting-started\u002Fschema-generation","Inspect generated schemas"," or return to the ",[87,93,95],{"href":94},"\u002Ferrors","error reference",".",[98,99,100],"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 .siqUp, html code.shiki .siqUp{--shiki-light:#4078F2;--shiki-default:#FE4450;--shiki-dark:#FE4450}html pre.shiki code .sI3kV, html code.shiki .sI3kV{--shiki-light:#50A14F;--shiki-default:#BBBBBB;--shiki-dark:#BBBBBB}",{"title":16,"searchDepth":102,"depth":102,"links":103},2,[104,105,106],{"id":30,"depth":102,"text":31},{"id":38,"depth":102,"text":39},{"id":78,"depth":102,"text":79},"Check Better Auth database options and plugins when schema generation returns an empty result.","md",null,{"editPath":111},"diagnostics\u002Fpages.ts",{"title":113},"Schema generator returned no code","\u002Ferrors\u002Fnuxt-auth-empty-schema",{"title":5,"description":107},"6.errors\u002Fnuxt-auth-empty-schema","Ivd-4erRpA2V70kV00raBRAvIfBNdTVLOYP5KMszoy4",[119,124],{"title":120,"path":121,"stem":122,"description":123,"children":-1},"Auth configuration failed to load","\u002Ferrors\u002Fnuxt-auth-config-load-failed","6.errors\u002Fnuxt-auth-config-load-failed","Resolve missing imports or environment variables that prevent the server auth config from loading.",{"title":125,"path":126,"stem":127,"description":128,"children":-1},"Invalid server auth config export","\u002Ferrors\u002Fnuxt-auth-invalid-config-export","6.errors\u002Fnuxt-auth-invalid-config-export","Export defineServerAuth(...) as the default export of your server auth config.",[130,167,193,240,265,286],{"title":131,"path":132,"stem":133,"children":134,"icon":137},"Getting Started","\u002Fgetting-started","1.getting-started\u002F0.index",[135,138,143,148,153,158,162],{"title":136,"path":132,"stem":133,"icon":137},"Introduction","i-lucide-sparkles",{"title":139,"path":140,"stem":141,"icon":142},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F1.installation","i-lucide-download",{"title":144,"path":145,"stem":146,"icon":147},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F2.configuration","i-lucide-settings",{"title":149,"path":150,"stem":151,"icon":152},"Client Setup","\u002Fgetting-started\u002Fclient-setup","1.getting-started\u002F3.client-setup","i-lucide-monitor",{"title":154,"path":155,"stem":156,"icon":157},"Type Augmentation","\u002Fgetting-started\u002Ftype-augmentation","1.getting-started\u002F4.type-augmentation","i-lucide-type",{"title":159,"path":89,"stem":160,"icon":161},"Schema Generation (NuxtHub)","1.getting-started\u002F5.schema-generation","i-lucide-database",{"title":163,"path":164,"stem":165,"icon":166},"How It Works","\u002Fgetting-started\u002Fhow-it-works","1.getting-started\u002F6.how-it-works","i-lucide-workflow",{"title":168,"path":169,"stem":170,"children":171,"page":192},"Core Concepts","\u002Fcore-concepts","2.core-concepts",[172,176,180,184,188],{"title":173,"path":174,"stem":175},"serverAuth()","\u002Fcore-concepts\u002Fserver-auth","2.core-concepts\u002F1.server-auth",{"title":177,"path":178,"stem":179},"Sessions","\u002Fcore-concepts\u002Fsessions","2.core-concepts\u002F2.sessions",{"title":181,"path":182,"stem":183},"Route Protection","\u002Fcore-concepts\u002Froute-protection","2.core-concepts\u002F3.route-protection",{"title":185,"path":186,"stem":187},"Auto‑Imports and Aliases","\u002Fcore-concepts\u002Fauto-imports-aliases","2.core-concepts\u002F4.auto-imports-aliases",{"title":189,"path":190,"stem":191},"Security & Caveats","\u002Fcore-concepts\u002Fsecurity-caveats","2.core-concepts\u002F5.security-caveats",false,{"title":194,"path":195,"stem":196,"children":197,"page":192},"Guides","\u002Fguides","3.guides",[198,202,207,211,215,219,224,228,232,236],{"title":199,"path":200,"stem":201},"Role‑Based Access","\u002Fguides\u002Frole-based-access","3.guides\u002F1.role-based-access",{"title":203,"path":204,"stem":205,"icon":206},"Setup diagnostics","\u002Fguides\u002Fdiagnostics","3.guides\u002F10.diagnostics","i-lucide-circle-alert",{"title":208,"path":209,"stem":210},"OAuth Providers","\u002Fguides\u002Foauth-providers","3.guides\u002F2.oauth-providers",{"title":212,"path":213,"stem":214},"Custom Database","\u002Fguides\u002Fcustom-database","3.guides\u002F3.custom-database",{"title":216,"path":217,"stem":218},"Database-less Mode","\u002Fguides\u002Fdatabase-less-mode","3.guides\u002F4.database-less-mode",{"title":220,"path":221,"stem":222,"icon":223},"External Auth Backend","\u002Fguides\u002Fexternal-auth-backend","3.guides\u002F5.external-auth-backend","i-lucide-server",{"title":225,"path":226,"stem":227},"Migrating from nuxt-auth-utils","\u002Fguides\u002Fmigrate-from-nuxt-auth-utils","3.guides\u002F6.migrate-from-nuxt-auth-utils",{"title":229,"path":230,"stem":231},"Two-Factor Authentication (TOTP + Backup Codes)","\u002Fguides\u002Ftwo-factor-auth","3.guides\u002F7.two-factor-auth",{"title":233,"path":234,"stem":235},"Testing","\u002Fguides\u002Ftesting","3.guides\u002F8.testing",{"title":237,"path":238,"stem":239},"Production Deployment","\u002Fguides\u002Fproduction-deployment","3.guides\u002F9.production-deployment",{"title":241,"path":242,"stem":243,"children":244,"page":192},"Integrations","\u002Fintegrations","4.integrations",[245,249,253,257,261],{"title":246,"path":247,"stem":248},"NuxtHub","\u002Fintegrations\u002Fnuxthub","4.integrations\u002F1.nuxthub",{"title":250,"path":251,"stem":252},"DevTools","\u002Fintegrations\u002Fdevtools","4.integrations\u002F2.devtools",{"title":254,"path":255,"stem":256},"Convex","\u002Fintegrations\u002Fconvex","4.integrations\u002F3.convex",{"title":258,"path":259,"stem":260},"i18n","\u002Fintegrations\u002Fi18n","4.integrations\u002F4.i18n",{"title":262,"path":263,"stem":264},"MCP","\u002Fintegrations\u002Fmcp","4.integrations\u002F5.mcp",{"title":266,"path":267,"stem":268,"children":269,"page":192},"API Reference","\u002Fapi","5.api",[270,274,278,282],{"title":271,"path":272,"stem":273},"Composables","\u002Fapi\u002Fcomposables","5.api\u002F1.composables",{"title":275,"path":276,"stem":277},"Server Utilities","\u002Fapi\u002Fserver-utils","5.api\u002F2.server-utils",{"title":279,"path":280,"stem":281},"Components","\u002Fapi\u002Fcomponents","5.api\u002F3.components",{"title":283,"path":284,"stem":285},"Types","\u002Fapi\u002Ftypes","5.api\u002F4.types",{"title":287,"path":94,"stem":288,"children":289,"icon":206},"Errors","6.errors\u002F0.index",[290,292,296,300,301,302,303,307,311,315,319,323,327,331],{"title":291,"path":94,"stem":288},"Overview",{"title":293,"path":294,"stem":295},"Better Auth CLI is not installed","\u002Ferrors\u002Fnuxt-auth-cli-missing","6.errors\u002Fnuxt-auth-cli-missing",{"title":297,"path":298,"stem":299},"Better Auth CLI version does not match better-auth","\u002Ferrors\u002Fnuxt-auth-cli-version-mismatch","6.errors\u002Fnuxt-auth-cli-version-mismatch",{"title":120,"path":121,"stem":122},{"title":113,"path":114,"stem":116},{"title":125,"path":126,"stem":127},{"title":304,"path":305,"stem":306},"Auth plugin path must be absolute","\u002Ferrors\u002Fnuxt-auth-invalid-plugin-source","6.errors\u002Fnuxt-auth-invalid-plugin-source",{"title":308,"path":309,"stem":310},"Missing auth configuration","\u002Ferrors\u002Fnuxt-auth-missing-config","6.errors\u002Fnuxt-auth-missing-config",{"title":312,"path":313,"stem":314},"NuxtHub database alias is missing","\u002Ferrors\u002Fnuxt-auth-missing-hub-db","6.errors\u002Fnuxt-auth-missing-hub-db",{"title":316,"path":317,"stem":318},"No database provider is enabled","\u002Ferrors\u002Fnuxt-auth-no-database-provider","6.errors\u002Fnuxt-auth-no-database-provider",{"title":320,"path":321,"stem":322},"Auth schema generation failed","\u002Ferrors\u002Fnuxt-auth-schema-generation-failed","6.errors\u002Fnuxt-auth-schema-generation-failed",{"title":324,"path":325,"stem":326},"Custom session storage is missing","\u002Ferrors\u002Fnuxt-auth-schema-storage-required","6.errors\u002Fnuxt-auth-schema-storage-required",{"title":328,"path":329,"stem":330},"Secondary storage in client-only mode","\u002Ferrors\u002Fnuxt-auth-storage-client-only","6.errors\u002Fnuxt-auth-storage-client-only",{"title":332,"path":333,"stem":334},"Unsupported database dialect","\u002Ferrors\u002Fnuxt-auth-unsupported-dialect","6.errors\u002Fnuxt-auth-unsupported-dialect",1796421056578,"4985160f-6317-408d-be23-822b99983e78"]