Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: How to debug circular dependency injections ? #1185

Open
codemasternode opened this issue Sep 5, 2023 · 0 comments
Open

question: How to debug circular dependency injections ? #1185

codemasternode opened this issue Sep 5, 2023 · 0 comments
Labels
type: question Questions about the usage of the library.

Comments

@codemasternode
Copy link

codemasternode commented Sep 5, 2023

Hi, i'm getting errors when modify my code (it has a lot of imports, injections etc., so i don't put any code up here). It's probably issue with circular injection but it' quite hard to catch the real problem. Error that i'm getting is:

RangeError: Maximum call stack size exceeded
at OrdinaryHasOwnMetadata (/web/node_modules/reflect-metadata/Reflect.js:592:40)
at OrdinaryGetMetadata (/web/node_modules/reflect-metadata/Reflect.js:601:26)
at Reflect.getMetadata (/web/node_modules/reflect-metadata/Reflect.js:357:20)
at ContainerInstance.getServiceValue (/web/node_modules/src/container-instance.class.ts:276:44)
at ContainerInstance.get (/web/node_modules/src/container-instance.class.ts:54:36)
at Object.value (/web/node_modules/src/decorators/inject.decorator.ts:38:34)
at /web/node_modules/src/container-instance.class.ts:331:45
at Array.map (<anonymous>)
at ContainerInstance.initializeParams (/web/node_modules/src/container-instance.class.ts:314:23)
at ContainerInstance.getServiceValue (/web/node_modules/src/container-instance.class.ts:277:27)

Do you guys have an idea how to break up this issue ? Such errors appear from time to time when i'm using typedi, i always spend a lot of time modyfing order of imports, injections etc. This errors doesn't provide any useful information.

@codemasternode codemasternode added the type: question Questions about the usage of the library. label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Questions about the usage of the library.
Development

No branches or pull requests

1 participant