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 booting the app with the given test module setup, I get a stack overflow. Not sure what's causing it.
Originally I was troubleshooting an issue which occurred sometimes when some a service's constructor throws an error, this would occur. While thinning down the app, this may be that issue is obscured by whatever this is.
I guess there's a double ask here if possible
Whatever the underlying issue is
Detection of this case, and a better error message. Even if only in test this could be hugely helpful, as that's often where module DAG errors are first encountered.
You can remove the error by commenting out the either forwardRef, the resolver annotation, or possibly other lines.
Expected behavior
App should boot. Instead we get a stack overflow
at InstanceWrapper.getInstanceByContextId (/Users/pehrlich/projects/debug2/node_modules/@nestjs/core/injector/instance-wrapper.js:51:20)
at InstanceWrapper.cloneStaticInstance (/Users/pehrlich/projects/debug2/node_modules/@nestjs/core/injector/instance-wrapper.js:180:37)
at InstanceWrapper.getInstanceByContextId (/Users/pehrlich/projects/debug2/node_modules/@nestjs/core/injector/instance-wrapper.js:51:20)
at InstanceWrapper.cloneStaticInstance (/Users/pehrlich/projects/debug2/node_modules/@nestjs/core/injector/instance-wrapper.js:180:37)
at InstanceWrapper.getInstanceByContextId (/Users/pehrlich/projects/debug2/node_modules/@nestjs/core/injector/instance-wrapper.js:51:20)
at InstanceWrapper.cloneStaticInstance (/Users/pehrlich/projects/debug2/node_modules/@nestjs/core/injector/instance-wrapper.js:180:37)
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
This test case involves a GraphQL Resolver, but I'm not sure if that's fundamental to the issue - just as far as I could narrow it down.
NestJS version
11.0.5
Packages versions
npx nest info 2025-03-18 14:07:41
npm error could not determine executable to run
npm error A complete log of this run can be found in: /Users/pehrlich/.npm/_logs/2025-03-18T18_08_25_590Z-debug-0.log
Is there an existing issue for this?
Current behavior
When booting the app with the given test module setup, I get a stack overflow. Not sure what's causing it.
Originally I was troubleshooting an issue which occurred sometimes when some a service's constructor throws an error, this would occur. While thinning down the app, this may be that issue is obscured by whatever this is.
I guess there's a double ask here if possible
Minimum reproduction code
https://github.com/pehrlich-arbor/nest-troubleshoot
Steps to reproduce
yarn
yarn jest
You can remove the error by commenting out the either forwardRef, the resolver annotation, or possibly other lines.
Expected behavior
App should boot. Instead we get a stack overflow
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
This test case involves a GraphQL Resolver, but I'm not sure if that's fundamental to the issue - just as far as I could narrow it down.
NestJS version
11.0.5
Packages versions
npx nest info 2025-03-18 14:07:41
npm error could not determine executable to run
npm error A complete log of this run can be found in: /Users/pehrlich/.npm/_logs/2025-03-18T18_08_25_590Z-debug-0.log
here's the full package.json
Node.js version
v22.5.1
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: