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

ctr-backoffice-backend v0.7.x UnhandledPromiseRejectionWarning: Error: A circular dependency has been detected (property key: "questionType"). Please, make sure that each side of a bidirectional relationships are using lazy resolvers ("type: () => ClassType"). #35

Closed
joaoluis-pdm opened this issue Aug 18, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@joaoluis-pdm
Copy link
Contributor

joaoluis-pdm commented Aug 18, 2021

Commit 7c8ef62
causes this error message.

...
[Nest] 48564   - 08/18/2021, 6:45:38 PM   [InstanceLoader] CTrialModule dependencies initialized +1ms
(node:48564) UnhandledPromiseRejectionWarning: Error: A circular dependency has been detected (property key: "questionType"). Please, make sure that each side of a bidirectional relationships are using lazy resolvers ("type: () => ClassType").
    at SchemaObjectFactory.createNotBuiltInTypeReference (/export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:212:19)
    at SchemaObjectFactory.mergePropertyWithMetadata (/export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:143:25)
    at /export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:79:35
    at Array.map (<anonymous>)
    at SchemaObjectFactory.extractPropertiesFromType (/export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:78:52)
    at SchemaObjectFactory.exploreModelSchema (/export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:92:41)
    at SchemaObjectFactory.createNotBuiltInTypeReference (/export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:217:37)
    at SchemaObjectFactory.mergePropertyWithMetadata (/export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:143:25)
    at /export/home/jpsl/develop/PharmaLedger/ctr-workspace/ctr-backoffice-backend/node_modules/@nestjs/swagger/dist/services/schema-object-factory.js:79:35
    at Array.map (<anonymous>)
(Use `node --trace-warnings ...` to show where the warning was created)
...
@joaoluis-pdm joaoluis-pdm added the bug Something isn't working label Aug 18, 2021
@joaoluis-pdm joaoluis-pdm self-assigned this Aug 18, 2021
@joaoluis-pdm
Copy link
Contributor Author

Seems related to typeorm/typeorm#4190

@joaoluis-pdm
Copy link
Contributor Author

joaoluis-pdm commented Aug 18, 2021

98c9a21 seems to work around the bug - based on typeorm/typeorm#4190 (comment) - but it seems not a proper solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant