question: passing Container to TypeORM useContainer fails
See original GitHub issueDescription
registering Container with typeorm’s useContainer does not work anymore as of the latest release 0.9.0
It throws the following error which is fine for services

Minimal code-snippet showcasing the problem
import { Container } from 'typedi';
import { useContainer } from 'typeorm';
....
useContainer(Container);
Unless I am missing something, this should not fail.
Expected behavior
It used to work fine. This has stopped working as of 0.9.0.
Actual behavior
It should not fail on passing typedi Container to typeorm
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:27 (8 by maintainers)
Top Results From Across the Web
typeorm/typeorm - Gitter
I tried to do a connection for each user as well, but have same problem. Following the log output and code I use...
Read more >ConnectionManager error using typeorm implementing typedi
However, I'd already placed useContainer(Container) above the connection settings. src/index.ts (Entry File) import './utils/env' import ' ...
Read more >typedi - Bountysource
question : passing Container to TypeORM useContainer fails $ 0. Created 1 year ago in typestack/typedi with 20 comments. Description. registering Container with ......
Read more >typeorm: CHANGELOG
entities , migrations , subscribers options inside DataSourceOptions accepting string directories support is deprecated. You'll be only able to pass entity ...
Read more >typeorm cannot read properties of undefined - You.com
But i added { eager: true } and then solved my problem. Open side panel ... useContainer(app.select(AppModule), { fallbackOnErrors: true });.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

In typeorm-typedi-extensions@0.4.1 has been added custom Container to register with TypeORM. So changing from:
to
helps.
For now I have downgraded to
typedi@0.8.0and it’s working.