typeorm / typeorm

ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
http://typeorm.io
MIT License
33.54k stars 6.22k forks source link

No metadata for "book" was found. #10882

Closed SevenOfPaul closed 3 weeks ago

SevenOfPaul commented 3 weeks ago

Issue description

I have import Bookentity to options.entity,but it always throw an error of No metadata for "book" was found.

Expected Behavior

index js - englishBackground (Workspace) - Visual Studio Code 2024_5_9 20_13_01 index js - englishBackground (Workspace) - Visual Studio Code 2024_5_9 20_13_14 index js - englishBackground (Workspace) - Visual Studio Code 2024_5_9 20_13_24 index js - englishBackground (Workspace) - Visual Studio Code 2024_5_9 20_13_29

Actual Behavior

https://github.com/typeorm/typeorm/assets/83870824/ee1fa457-91ff-4807-9ba5-7c530abb2544

Steps to reproduce

index js - englishBackground (Workspace) - Visual Studio Code 2024_5_9 20_13_01

My Environment

Dependency Version
Operating System
Node.js version v20.2.0
Typescript version x.y.zzz
TypeORM version 0.3.20

Additional Context

No response

Relevant Database Driver(s)

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, and I know how to start.