{ EntityMetadataNotFound: No metadata for "User" was found.
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
Solution: { EntityMetadataNotFound: No metadata for "User" was found.
In my case, I just needed to change this : [code block] Into this : [code block]
Trust Score
8 verifications
- 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
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep