FG
🗄️ Databases

{ EntityMetadataNotFound: No metadata for "User" was found.

Freshover 8 years ago
Mar 14, 20260 views
Confidence Score78%
78%

Problem

Hello, I'm trying to setup a new project using the latest release and the ormconfig.yml options. I'm following the documentation and pointing it to the `src/entity/*.js` location, but i keep getting the following error when running my server.spec.ts file through mocha: [code block] I've posted a sample repo here: https://github.com/rightisleft/public-error https://github.com/rightisleft/public-error/blob/master/server/test/server.spec.ts#L29 I've been reading the documentation at https://github.com/typeorm/typeorm/issues/420 but have been unable to resolve the problem. Please advise. Checklist: Using reflect-metadata in spec Using "emitDecoratorMetadata": true, "experimentalDecorators": true in tsconfig.json Using 'entries' delcaration in ormconfig.yml

Error Output

error when running my server.spec.ts file through mocha:

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
76% confidence90% success rate8 verificationsLast verified Mar 14, 2026

Solution: { EntityMetadataNotFound: No metadata for "User" was found.

Low Risk

In my case, I just needed to change this : [code block] Into this : [code block]

76

Trust Score

8 verifications

90% success
  1. 1

    In my case, I just needed to change this :

    In my case, I just needed to change this :

Validation

Resolved in typeorm/typeorm GitHub issue #1327. Community reactions: 60 upvotes.

Verification Summary

Worked: 8
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