---
title: "NUXT_B5033"
description: "A schema was assigned to the runtime config directly."
canonical_url: "https://nuxt.com/docs/4.x/errors/b5033"
---
# B5033

A value in `nuxt.options.runtimeConfig` is a [schema](https://nuxt.com/docs/4.x/guide/going-further/runtime-config#validating-with-a-schema). Nuxt replaces schemas with their default values when the configuration is loaded, and when a module calls `updateRuntimeConfig()`. A schema assigned to `nuxt.options.runtimeConfig` directly is never replaced, so modules that read it would receive the schema itself rather than a value.

## Resolution

In a module, pass the schema to [`updateRuntimeConfig()`](https://nuxt.com/docs/4.x/api/kit/runtime-config#updateruntimeconfig):

```ts [module.ts]
import { defineNuxtModule, updateRuntimeConfig } from '@nuxt/kit'
import { z } from 'zod'

export default defineNuxtModule({
  setup (_options, nuxt) {
    nuxt.options.runtimeConfig.myModule = z.object({ apiKey: z.string() }) // [!code --]
    updateRuntimeConfig({ myModule: z.object({ apiKey: z.string() }) }) // [!code ++]
  },
})
```

If the module is not your own, report it to the module author.


## Sitemap

See the full [sitemap](https://nuxt.com/sitemap.md) for all pages.
