Errors

NUXT_AUTH_CONFIG_LOAD_FAILED: Auth configuration failed to load

Resolve missing imports or environment variables that prevent the server auth config from loading.
Example error
[NUXT_AUTH_CONFIG_LOAD_FAILED] Failed to load auth config at server/auth.config.ts: Missing RESEND_API_KEY

Why this happens

An import or config factory threw while the module loaded the server auth config for schema generation. The original error follows the config path in the diagnostic. Development preserves the previous schema; production setup fails.

How to fix it

Check the config imports and required environment variables, then restart Nuxt to regenerate the schema.

For the example above, provide the key required by the email client before Nuxt loads the config:

.env
RESEND_API_KEY=your-development-api-key

Set the corresponding environment variable in your build environment for production. If the underlying error says Cannot find module, check the import path and whether the dependency is installed. Fix the underlying error before generating migrations from the schema.

Verify the fix

Restart Nuxt. Confirm the config loads and the regenerated schema contains your additional fields and plugin tables.

See Understand schema generation or return to the error reference.