nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
67.66k stars 7.63k forks source link

ApplicationConfig got undefined, global enhancers doesnt work when using `NestFactory.createApplicationContext` #12165

Closed SocketSomeone closed 1 year ago

SocketSomeone commented 1 year ago

Is there an existing issue for this?

Current behavior

When I using libs which using ExternalContextCreator for apps - global enhancers doesnt work for some reason. (For example nest-commander, necord)

Minimum reproduction code

https://github.com/SocketSomeone/nestjs-standalone-apps-issue

Steps to reproduce

  1. yarn install
  2. yarn start:dev

Expected behavior

After bootstrap application allow to create fns via ExternalContextCreator with global enhancers. For that we need to pass ApplicationConfig to container

Package

Other package

No response

NestJS version

10.1.0

Packages versions

[System Information]
OS Version     : Windows 10
NodeJS Version : v18.12.1
YARN Version    : 1.22.19 

[Nest CLI]
Nest CLI Version : 10.1.8

[Nest Platform Information]
common version : 10.1.0
core version   : 10.1.0

Node.js version

18.12.1

In which operating systems have you tested?

Other

No response

kamilmysliwiec commented 1 year ago

Let's track this here https://github.com/nestjs/nest/pull/12166