[{"data":1,"prerenderedAt":334,"buildId":335},["ShallowReactive",2],{"-errors":3,"-errors-surround":128,"navigation_docs":138},{"id":4,"title":5,"body":6,"description":117,"extension":118,"links":119,"meta":120,"navigation":122,"path":124,"seo":125,"stem":126,"__hash__":127},"docs\u002F6.errors\u002F0.index.md","Error reference",{"type":7,"value":8,"toc":113},"minimark",[9,13,110],[10,11,12],"p",{},"Use the diagnostic code from your terminal to find its cause, a fix example, and a way to check the result. These codes describe module setup and schema generation. Sign-in errors retain Better Auth's codes, and session authorization failures retain their HTTP 401 or 403 status.",[14,15,16,26,33,40,47,54,61,68,75,82,89,96,103],"ul",{},[17,18,19],"li",{},[20,21,25],"a",{"className":22,"href":24},[23],"block","\u002Ferrors\u002Fnuxt-auth-missing-config","NUXT_AUTH_MISSING_CONFIG: Missing auth configuration",[17,27,28],{},[20,29,32],{"className":30,"href":31},[23],"\u002Ferrors\u002Fnuxt-auth-no-database-provider","NUXT_AUTH_NO_DATABASE_PROVIDER: No database provider is enabled",[17,34,35],{},[20,36,39],{"className":37,"href":38},[23],"\u002Ferrors\u002Fnuxt-auth-missing-hub-db","NUXT_AUTH_MISSING_HUB_DB: NuxtHub database alias is missing",[17,41,42],{},[20,43,46],{"className":44,"href":45},[23],"\u002Ferrors\u002Fnuxt-auth-invalid-plugin-source","NUXT_AUTH_INVALID_PLUGIN_SOURCE: Auth plugin path must be absolute",[17,48,49],{},[20,50,53],{"className":51,"href":52},[23],"\u002Ferrors\u002Fnuxt-auth-storage-client-only","NUXT_AUTH_STORAGE_CLIENT_ONLY: Secondary storage in client-only mode",[17,55,56],{},[20,57,60],{"className":58,"href":59},[23],"\u002Ferrors\u002Fnuxt-auth-schema-storage-required","NUXT_AUTH_SCHEMA_STORAGE_REQUIRED: Custom session storage is missing",[17,62,63],{},[20,64,67],{"className":65,"href":66},[23],"\u002Ferrors\u002Fnuxt-auth-unsupported-dialect","NUXT_AUTH_UNSUPPORTED_DIALECT: Unsupported database dialect",[17,69,70],{},[20,71,74],{"className":72,"href":73},[23],"\u002Ferrors\u002Fnuxt-auth-invalid-config-export","NUXT_AUTH_INVALID_CONFIG_EXPORT: Invalid server auth config export",[17,76,77],{},[20,78,81],{"className":79,"href":80},[23],"\u002Ferrors\u002Fnuxt-auth-config-load-failed","NUXT_AUTH_CONFIG_LOAD_FAILED: Auth configuration failed to load",[17,83,84],{},[20,85,88],{"className":86,"href":87},[23],"\u002Ferrors\u002Fnuxt-auth-cli-missing","NUXT_AUTH_CLI_MISSING: Better Auth CLI is not installed",[17,90,91],{},[20,92,95],{"className":93,"href":94},[23],"\u002Ferrors\u002Fnuxt-auth-cli-version-mismatch","NUXT_AUTH_CLI_VERSION_MISMATCH: Better Auth CLI version does not match better-auth",[17,97,98],{},[20,99,102],{"className":100,"href":101},[23],"\u002Ferrors\u002Fnuxt-auth-empty-schema","NUXT_AUTH_EMPTY_SCHEMA: Schema generator returned no code",[17,104,105],{},[20,106,109],{"className":107,"href":108},[23],"\u002Ferrors\u002Fnuxt-auth-schema-generation-failed","NUXT_AUTH_SCHEMA_GENERATION_FAILED: Auth schema generation failed",[10,111,112],{},"If a config cannot load during development, the module skips schema regeneration and preserves the existing schema. Production builds fail on the same config error. Read the specific diagnostic before creating a database migration.",{"title":114,"searchDepth":115,"depth":115,"links":116},"",2,[],"Find the cause and fix for Nuxt Better Auth module setup and schema generation errors.","md",null,{"editPath":121},"diagnostics\u002Fgenerate.ts",{"title":123},"Overview","\u002Ferrors",{"title":5,"description":117},"6.errors\u002F0.index","UxTgbp5Mff52zkV52NYPtRO2VfPEeMKyGnqgyZyLKI4",[129,134],{"title":130,"path":131,"stem":132,"description":133,"children":-1},"Types","\u002Fapi\u002Ftypes","5.api\u002F4.types","Public types and route rule shapes.",{"title":135,"path":87,"stem":136,"description":137,"children":-1},"Better Auth CLI is not installed","6.errors\u002Fnuxt-auth-cli-missing","Install the auth package so the module can generate the NuxtHub schema.",[139,177,203,250,275,293],{"title":140,"path":141,"stem":142,"children":143,"icon":146},"Getting Started","\u002Fgetting-started","1.getting-started\u002F0.index",[144,147,152,157,162,167,172],{"title":145,"path":141,"stem":142,"icon":146},"Introduction","i-lucide-sparkles",{"title":148,"path":149,"stem":150,"icon":151},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F1.installation","i-lucide-download",{"title":153,"path":154,"stem":155,"icon":156},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F2.configuration","i-lucide-settings",{"title":158,"path":159,"stem":160,"icon":161},"Client Setup","\u002Fgetting-started\u002Fclient-setup","1.getting-started\u002F3.client-setup","i-lucide-monitor",{"title":163,"path":164,"stem":165,"icon":166},"Type Augmentation","\u002Fgetting-started\u002Ftype-augmentation","1.getting-started\u002F4.type-augmentation","i-lucide-type",{"title":168,"path":169,"stem":170,"icon":171},"Schema Generation (NuxtHub)","\u002Fgetting-started\u002Fschema-generation","1.getting-started\u002F5.schema-generation","i-lucide-database",{"title":173,"path":174,"stem":175,"icon":176},"How It Works","\u002Fgetting-started\u002Fhow-it-works","1.getting-started\u002F6.how-it-works","i-lucide-workflow",{"title":178,"path":179,"stem":180,"children":181,"page":202},"Core Concepts","\u002Fcore-concepts","2.core-concepts",[182,186,190,194,198],{"title":183,"path":184,"stem":185},"serverAuth()","\u002Fcore-concepts\u002Fserver-auth","2.core-concepts\u002F1.server-auth",{"title":187,"path":188,"stem":189},"Sessions","\u002Fcore-concepts\u002Fsessions","2.core-concepts\u002F2.sessions",{"title":191,"path":192,"stem":193},"Route Protection","\u002Fcore-concepts\u002Froute-protection","2.core-concepts\u002F3.route-protection",{"title":195,"path":196,"stem":197},"Auto‑Imports and Aliases","\u002Fcore-concepts\u002Fauto-imports-aliases","2.core-concepts\u002F4.auto-imports-aliases",{"title":199,"path":200,"stem":201},"Security & Caveats","\u002Fcore-concepts\u002Fsecurity-caveats","2.core-concepts\u002F5.security-caveats",false,{"title":204,"path":205,"stem":206,"children":207,"page":202},"Guides","\u002Fguides","3.guides",[208,212,217,221,225,229,234,238,242,246],{"title":209,"path":210,"stem":211},"Role‑Based Access","\u002Fguides\u002Frole-based-access","3.guides\u002F1.role-based-access",{"title":213,"path":214,"stem":215,"icon":216},"Setup diagnostics","\u002Fguides\u002Fdiagnostics","3.guides\u002F10.diagnostics","i-lucide-circle-alert",{"title":218,"path":219,"stem":220},"OAuth Providers","\u002Fguides\u002Foauth-providers","3.guides\u002F2.oauth-providers",{"title":222,"path":223,"stem":224},"Custom Database","\u002Fguides\u002Fcustom-database","3.guides\u002F3.custom-database",{"title":226,"path":227,"stem":228},"Database-less Mode","\u002Fguides\u002Fdatabase-less-mode","3.guides\u002F4.database-less-mode",{"title":230,"path":231,"stem":232,"icon":233},"External Auth Backend","\u002Fguides\u002Fexternal-auth-backend","3.guides\u002F5.external-auth-backend","i-lucide-server",{"title":235,"path":236,"stem":237},"Migrating from nuxt-auth-utils","\u002Fguides\u002Fmigrate-from-nuxt-auth-utils","3.guides\u002F6.migrate-from-nuxt-auth-utils",{"title":239,"path":240,"stem":241},"Two-Factor Authentication (TOTP + Backup Codes)","\u002Fguides\u002Ftwo-factor-auth","3.guides\u002F7.two-factor-auth",{"title":243,"path":244,"stem":245},"Testing","\u002Fguides\u002Ftesting","3.guides\u002F8.testing",{"title":247,"path":248,"stem":249},"Production Deployment","\u002Fguides\u002Fproduction-deployment","3.guides\u002F9.production-deployment",{"title":251,"path":252,"stem":253,"children":254,"page":202},"Integrations","\u002Fintegrations","4.integrations",[255,259,263,267,271],{"title":256,"path":257,"stem":258},"NuxtHub","\u002Fintegrations\u002Fnuxthub","4.integrations\u002F1.nuxthub",{"title":260,"path":261,"stem":262},"DevTools","\u002Fintegrations\u002Fdevtools","4.integrations\u002F2.devtools",{"title":264,"path":265,"stem":266},"Convex","\u002Fintegrations\u002Fconvex","4.integrations\u002F3.convex",{"title":268,"path":269,"stem":270},"i18n","\u002Fintegrations\u002Fi18n","4.integrations\u002F4.i18n",{"title":272,"path":273,"stem":274},"MCP","\u002Fintegrations\u002Fmcp","4.integrations\u002F5.mcp",{"title":276,"path":277,"stem":278,"children":279,"page":202},"API Reference","\u002Fapi","5.api",[280,284,288,292],{"title":281,"path":282,"stem":283},"Composables","\u002Fapi\u002Fcomposables","5.api\u002F1.composables",{"title":285,"path":286,"stem":287},"Server Utilities","\u002Fapi\u002Fserver-utils","5.api\u002F2.server-utils",{"title":289,"path":290,"stem":291},"Components","\u002Fapi\u002Fcomponents","5.api\u002F3.components",{"title":130,"path":131,"stem":132},{"title":294,"path":124,"stem":126,"children":295,"icon":216},"Errors",[296,297,298,301,304,307,310,313,316,319,322,325,328,331],{"title":123,"path":124,"stem":126},{"title":135,"path":87,"stem":136},{"title":299,"path":94,"stem":300},"Better Auth CLI version does not match better-auth","6.errors\u002Fnuxt-auth-cli-version-mismatch",{"title":302,"path":80,"stem":303},"Auth configuration failed to load","6.errors\u002Fnuxt-auth-config-load-failed",{"title":305,"path":101,"stem":306},"Schema generator returned no code","6.errors\u002Fnuxt-auth-empty-schema",{"title":308,"path":73,"stem":309},"Invalid server auth config export","6.errors\u002Fnuxt-auth-invalid-config-export",{"title":311,"path":45,"stem":312},"Auth plugin path must be absolute","6.errors\u002Fnuxt-auth-invalid-plugin-source",{"title":314,"path":24,"stem":315},"Missing auth configuration","6.errors\u002Fnuxt-auth-missing-config",{"title":317,"path":38,"stem":318},"NuxtHub database alias is missing","6.errors\u002Fnuxt-auth-missing-hub-db",{"title":320,"path":31,"stem":321},"No database provider is enabled","6.errors\u002Fnuxt-auth-no-database-provider",{"title":323,"path":108,"stem":324},"Auth schema generation failed","6.errors\u002Fnuxt-auth-schema-generation-failed",{"title":326,"path":59,"stem":327},"Custom session storage is missing","6.errors\u002Fnuxt-auth-schema-storage-required",{"title":329,"path":52,"stem":330},"Secondary storage in client-only mode","6.errors\u002Fnuxt-auth-storage-client-only",{"title":332,"path":66,"stem":333},"Unsupported database dialect","6.errors\u002Fnuxt-auth-unsupported-dialect",1796349484951,"82f4fc94-b7ac-4ea5-a59a-eca7f06d445a"]