RepositoryNotFoundError
See original GitHub issueI have one entity(Player) and path in config is 100% good, because typeorm is creating table in db AND when im using this.connection.getRepository("Player"
) it finds it too(no error), but when im trying to import it using TypeOrmModule.forFeature([Player])
i got this error.
@edit
i just find out that if in this.connection.getRepository
im using Player
class, not string it throws error too.
Code: https://github.com/Gecko222/game/tree/backend-refactor/src_server
PS. Stacktrace is showing wierd path:
Error
at new RepositoryNotFoundError (E:\repos\game\src\error\RepositoryNotFoundError.ts:12:22)
at EntityManager.getRepository (E:\repos\game\src\entity-manager\EntityManager.ts:769:19)
at Connection.getRepository (E:\repos\game\src\connection\Connection.ts:306:29)
at getRepository (E:\repos\game\node_modules\@nestjs\typeorm\typeorm.providers.js:8:22)
at Object.useFactory [as metatype] (E:\repos\game\node_modules\@nestjs\typeorm\typeorm.providers.js:11:37)
at Injector.<anonymous> (E:\repos\game\node_modules\@nestjs\core\injector\injector.js:84:59)
i dont have folder src.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
RepositoryNotFoundError : TypeORM - Stack Overflow
It looks like your entity import is not working. If you import via the wildcard: entities: [ __dirname + "/entity/*.js" ],`.
Read more >typeorm/typeorm - Gitter
"RepositoryNotFoundError: No repository for "MyModelName" was found. Looks like this entity is not registered in current "default" connection?".
Read more >External module "error/RepositoryNotFoundError" - typeorm
Globals · "error/RepositoryNotFoundError". External module "error/RepositoryNotFoundError". Index. Classes. RepositoryNotFoundError.
Read more >reviewboard.scmtools.errors | Documentation | Review Board
exception RepositoryNotFoundError (msg=None, form_field_id=None)[source]¶. Bases: reviewboard.scmtools.errors.SCMError. An error indicating that a given ...
Read more >Utilities - Hugging Face
RepositoryNotFoundError : 401 Client Error. (Request ID: PvMw_VjBMjVdMz53WKIzP) Repository Not Found for url: https://huggingface.co/api/models/% ...
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
I was facing the same issue but what fixed for me is I was missing the decorator
@Entity()
in my entity file.Clean all files from /dist folder and start your application This is the config for posgresql/nestjs/typeorm which i use const connexionAtsDb: TypeOrmModuleOptions = { type: ‘postgres’, host: ‘localhost’, port: 5432, username: ‘postgres’, password: ‘admin’, database: ‘pass’,
schema: ‘warehouse’, entities: [__dirname + ‘/…/**/*.entity.{js,ts}’], synchronize: true, }; i hope to fix your problem