---
title: "@nestjs/config 12.1.0 Breaking Changes on npm | Since.dev"
description: "What each @nestjs/config release removed, renamed or changed: 28 breaking changes in 5 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/@nestjs/config
last_updated: 2026-12-04
---

# @nestjs/config breaking changes

@nestjs/config 12.1.0 (November 4, 2026) is its newest release with breaking changes, 6 of them. The first: Validation errors no longer include the rejected value in @nestjs/config 12.1.0. Every breaking API change we have recorded in @nestjs/config on npm: 28 breaking changes in 5 versions. Below, its 5 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `12.1.1`, released November 6, 2026. [Source repository](https://github.com/nestjs/config)

Packages on npm run on Node.js. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [4.0.1](#v-4-0-1) to [12.1.0](#v-12-1-0): 18 breaking changes in 2 versions.
- From [3.0.0](#v-3-0-0) to [12.1.0](#v-12-1-0): 27 breaking changes in 4 versions.

## @nestjs/config 12.1.0 breaking changes

@nestjs/config 12.1.0, released November 4, 2026: 6 breaking changes.

- **Behavior changed**  

Error messages omit the rejected value, so code that parses them may need updating. [github.com](https://github.com/nestjs/config/releases/tag/12.1.0)
- **Behavior changed**  

Startup fails for such values instead of truncating them in process.env. [github.com](https://github.com/nestjs/config/releases/tag/12.1.0)
- **Behavior changed** `ConfigService.get`  

Members inherited from built-ins such as toString or constructor now return undefined. Code relying on them must change. [github.com](https://github.com/nestjs/config/releases/tag/12.1.0)
- **Behavior changed** `ConfigService.set`  

A dependent variable re-expanded to more than 128 KiB now makes set() throw. [github.com](https://github.com/nestjs/config/releases/tag/12.1.0)
- **Signature changed** `ConfigModuleOptions.validate`  

Was validate?: (config: Record\<string, any>) => Record\<string, any>; now validate?: (config: Record\<string, any>) => Record\<string, any> | Promise\<Record\<string, any>>. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/12.1.0)
- **Signature changed** `ConfigService.constructor`  

Was constructor(internalConfig?: Record\<string, any>); now constructor(internalConfig?: Record\<string | symbol, any>). [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/12.1.0)

## @nestjs/config 12.0.0 breaking changes

@nestjs/config 12.0.0, released August 27, 2026: 12 breaking changes.

- **Removed**  

The lodash dependency is gone. This only breaks code that relied on lodash being installed transitively. [github.com](https://github.com/nestjs/config/releases/tag/12.0.0)
- **Removed**  

The peer dependency on @nestjs/common is now ^11.0.0 || ^12.0.0. Users still on Nest 10 must stay on @nestjs/config@4. [github.com](https://github.com/nestjs/config/releases/tag/12.0.0)
- **Removed**  

Imports such as '@nestjs/config/dist/config.service' no longer resolve. Import from the package root instead. [github.com](https://github.com/nestjs/config/releases/tag/12.0.0)
- **Behavior changed**  

The package is published as pure ESM behind an exports map. CommonJS apps can keep using require('@nestjs/config'), but deep imports into build internals no longer resolve, so import from the package root. [github.com](https://github.com/nestjs/config/releases/tag/12.0.0)
- **Behavior changed** `validationSchema`  

Each issue is rendered as 'path: message' with newline-separated issues. Code that asserts on the old single-line Joi message must be updated. [github.com](https://github.com/nestjs/config/releases/tag/12.0.0)
- **Signature changed** `ConditionalModule.registerWhen`  

Was static registerWhen(module: Required\<ModuleMetadata>\['imports'\]\[number\], condition: string | ((env: NodeJS.ProcessEnv) => boolean), options?: {timeout?: number; debug?: boolean;}): Promise\<Required\<Pick\<DynamicModule, "module" |... [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/12.0.0)
- **Signature changed** `ConfigModule.forRoot`  

Was static forRoot\<ValidationOptions extends Record\<string, any>>(options?: ConfigModuleOptions\<ValidationOptions>): Promise\<DynamicModule>; now static forRoot(options?: ConfigModuleOptions): Promise\<DynamicModule>. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/12.0.0)
- **Signature changed** `ConfigModuleOptions`  

Was interface ConfigModuleOptions\<ValidationOptions extends Record\<string, any> = Record\<string, any>>; now interface ConfigModuleOptions\<ValidationOptions extends StandardSchemaV1.Options = StandardSchemaV1.Options>. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/12.0.0)
- **Signature changed** `ConfigModuleOptions.validationSchema`  

A schema that does not implement the Standard Schema spec is now a compile-time error instead of a runtime one. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/12.0.0)
- **Signature changed** `ConfigService.get`  

Explicit types inconsistent with the config value at the given path now fail to compile. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/12.0.0)

And 2 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## @nestjs/config 4.0.1 breaking changes

@nestjs/config 4.0.1, released March 3, 2025: 5 breaking changes.

- **Signature changed** `ConfigFactoryKeyHost.asProvider`  

Was asProvider(): {imports: \[ReturnType\<typeof ConfigModule.forFeature>\]; useFactory: (config: T) => T; inject: \[string\];}; now asProvider(): {imports: \[ReturnType\<typeof ConfigModule.forFeature>\]; useFactory: (config: T) => T; inject... [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/4.0.1)
- **Signature changed** `ConfigFactoryKeyHost.KEY`  

Was KEY: string; now KEY: string | symbol. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/4.0.1)
- **Signature changed** `ConfigService`  

Was class ConfigService\<K = Record\<string, unknown>, WasValidated extends boolean = false>; now class ConfigService\<K = Record\<string | symbol, unknown>, WasValidated extends boolean = false>. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/4.0.1)
- **Signature changed** `getConfigToken`  

Was function getConfigToken(token: string): string; now function getConfigToken(token: string | symbol): string. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/4.0.1)
- **Signature changed** `registerAs`  

Was function registerAs\<TConfig extends ConfigObject, TFactory extends ConfigFactory = ConfigFactory\<TConfig>>(token: string, configFactory: TFactory): TFactory & ConfigFactoryKeyHost\<ReturnType\<TFactory>>; now function registerAs\<TConfig... [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/4.0.1)

## @nestjs/config 4.0.0 breaking changes

@nestjs/config 4.0.0, released January 17, 2025: 4 breaking changes.

- **Behavior changed** `ConfigService.get`  

Internal configuration (namespaces and custom config files) now takes precedence over validated environment variables and process.env. Code that relied on env vars overriding internal config must change. [github.com](https://github.com/nestjs/config/releases/tag/4.0.0)
- **Signature changed** `ConfigModule.forRoot`  

Was static forRoot(options?: ConfigModuleOptions): Promise\<DynamicModule>; now static forRoot\<ValidationOptions extends Record\<string, any>>(options?: ConfigModuleOptions\<ValidationOptions>): Promise\<DynamicModule>. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/4.0.0)
- **Signature changed** `ConfigModuleOptions`  

Was interface ConfigModuleOptions; now interface ConfigModuleOptions\<ValidationOptions extends Record\<string, any> = Record\<string, any>>. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/4.0.0)
- **Signature changed** `ConfigModuleOptions.validationOptions`  

Was validationOptions?: Record\<string, any>; now validationOptions?: ValidationOptions. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/4.0.0)

## @nestjs/config 3.0.0 breaking changes

@nestjs/config 3.0.0, released June 15, 2023: 1 breaking change.

- **Removed** `ConfigModuleOptions.encoding`  

The unused encoding option was removed from the module options. Code that passes encoding should remove it. [npmjs.com](https://www.npmjs.com/package/@nestjs/config/v/3.0.0)

## Related packages

- [@nestjs/cli](https://since.dev/packages/npm/@nestjs/cli.md)
- [@nestjs/common](https://since.dev/packages/npm/@nestjs/common.md)
- [@nestjs/core](https://since.dev/packages/npm/@nestjs/core.md)
- [@nestjs/jwt](https://since.dev/packages/npm/@nestjs/jwt.md)
- [@nestjs/mapped-types](https://since.dev/packages/npm/@nestjs/mapped-types.md)
- [@nestjs/microservices](https://since.dev/packages/npm/@nestjs/microservices.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
