-
-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Labels
Description
Acknowledgements
- I read the documentation and searched existing issues to avoid duplicates
- I understand this is a bug tracker and anything other than a proven bug will be closed
- I understand this is a free project and relies on community contributions
- I read and understood the Contribution guide
Minimal reproduction URL
https://github.com/wlcastro/typeorm-tsx-decorator-metadata-issue
Problem & expected behavior
This issue has already been reported in #485 and #216, but both were closed and restricted to collaborators — so I’m opening a new issue to share a reproducible example and a workaround that resolves it.
What happened: When using TypeORM with TSX, I get a ColumnTypeUndefinedError for properties decorated with @Column() — even with emitDecoratorMetadata: true in tsconfig.json and reflect-metadata imported correctly.
What I expected: The code should run normally, as it does with ts-node or tsc.
Error stack trace:
ColumnTypeUndefinedError: Column type for User#name is not defined and cannot be guessed.
Explicitly declaring the column type (e.g. @Column("text")) is a workaround for the issue. I’m sharing this to help others and suggest documenting this limitation in TSX.
Bugs are expected to be fixed by those affected by it
- I'm interested in working on this issue
Compensating engineering work will speed up resolution and support the project
- I'm willing to offer $10 for financial support
piec