You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When option bufferLogs is enabled, logs are not flushed on error during app initialization. Passing autoFlushLogs: true does not change the behavior. The application closes without a message, exit value of node process is 1.
The error is displayed correctly, when option bufferLogs is disabled.
Probable cause: this.autoFlushLogs is not passed (compare call to asyncRun).
[Nest] 23 - 05/04/2024, 09:05:23 ERROR [ExceptionHandler] Nest could not find AppService element (this provider does not exist in the current context)
Error: Nest could not find AppService element (this provider does not exist in the current context)
at RuntimeException (/home/projects/nestjs-typescript-starter-1y1fvy/node_modules/@nestjs/core/errors/exceptions/runtime.exception.js:6:9)
at UnknownElementException (/home/projects/nestjs-typescript-starter-1y1fvy/node_modules/@nestjs/core/errors/exceptions/unknown-element.exception.js:8:9)
at get (/home/projects/nestjs-typescript-starter-1y1fvy/node_modules/@nestjs/core/injector/instance-links-host.js:15:19)
at find (/home/projects/nestjs-typescript-starter-1y1fvy/node_modules/@nestjs/core/injector/abstract-instance-resolver.js:8:60)
at get (/home/projects/nestjs-typescript-starter-1y1fvy/node_modules/@nestjs/core/nest-application-context.js:70:20)
at createExceptionZone/</< (/home/projects/nestjs-typescript-starter-1y1fvy/node_modules/@nestjs/core/nest-factory.js:145:40)
at run (/home/projects/nestjs-typescript-starter-1y1fvy/node_modules/@nestjs/core/errors/exceptions-zone.js:10:13)
at createExceptionZone/< (/home/projects/nestjs-typescript-starter-1y1fvy/node_modules/@nestjs/core/nest-factory.js:144:46)
at get/< (/home/projects/nestjs-typescript-starter-1y1fvy/node_modules/@nestjs/core/nest-factory.js:193:54)
at bootstrap (/home/projects/nestjs-typescript-starter-1y1fvy/src/main.ts:7:19)
Package
I don't know. Or some 3rd-party package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other (see below)
Other package
No response
NestJS version
10.3.7
Packages versions
[Nest CLI]
Nest CLI Version : 10.3.2
[Nest Platform Information]
platform-express version : 10.3.7
microservices version : 10.3.7
schematics version : 10.1.1
swagger version : 7.3.1
testing version : 10.3.7
common version : 10.3.7
config version : 3.2.1
axios version : 3.0.2
core version : 10.3.7
cli version : 10.3.2
Node.js version
v18.18.2
In which operating systems have you tested?
macOS
Windows
Linux
Other
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current behavior
When option
bufferLogs
is enabled, logs are not flushed on error during app initialization. PassingautoFlushLogs: true
does not change the behavior. The application closes without a message, exit value ofnode
process is 1.The error is displayed correctly, when option
bufferLogs
is disabled.Probable cause:
this.autoFlushLogs
is not passed (compare call to asyncRun).https://github.com/nestjs/nest/blob/8b4dbb30909be86290d01da54205ab4bf081ab46/packages/core/nest-factory.ts#L264C3-L278C4
Minimum reproduction code
https://stackblitz.com/edit/nestjs-typescript-starter-1y1fvy?file=src%2Fmain.ts
Steps to reproduce
nest start
Expected behavior
The following error should be displayed:
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
10.3.7
Packages versions
Node.js version
v18.18.2
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: