FG
💻 Software🗄️ Databases

Error: RepositoryNotFoundError: No repository for [Enitity] was found. Looks like this entity is not registered in current "default" connection?

Freshover 7 years ago
Mar 14, 20260 views
Confidence Score79%
79%

Problem

Issue type: [x] question [x] bug report [ ] feature request [ ] documentation issue Database system/driver: [ ] `cordova` [ ] `mongodb` [ ] `mssql` [x] `mysql` / `mariadb` [ ] `oracle` [ ] `postgres` [ ] `sqlite` [ ] `sqljs` [ ] `react-native` [ ] `expo` TypeORM version: [ ] `latest` [ ] `@next` [x] `0.2.8` (or put your version here) Steps to reproduce or a small repository showing the problem: 1. Create my entity: import {Entity, PrimaryColumn, Column, BaseEntity} from "typeorm"; [code block] 2. Create my method: [code block] 3. Test with: `mocha --require ts-node/register './*/.test.ts' --recursive` Then, it throws that error. But also, it occurs not every time. Sometimes, the code can run well three or four times and then throw that bug next time. I don't really know what the cause is as I took that code from another of my projects in which it was and is working just fine.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
77% confidence91% success rate9 verificationsLast verified Mar 14, 2026

Solution: Error: RepositoryNotFoundError: No repository for [Enitity] was found. Looks like this entity is not registered in current "default" connection?

Low Risk

https://typeorm.io/#/connection-options/common-connection-options [code block]

77

Trust Score

9 verifications

91% success
  1. 1

    https://typeorm.io/#/connection-options/common-connection-options

    [code block]

Validation

Resolved in typeorm/typeorm GitHub issue #3017. Community reactions: 92 upvotes.

Verification Summary

Worked: 9
Partial: 1
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

typeormormtypescript