Entity discovery on TsMorphMetadataProvider broken since 6.2.2 #5536
sebastiaanviaene
started this conversation in
General
Replies: 1 comment 2 replies
-
I need to see a reproduction, pointing to a problematic commit won't cut it. cc @xmajzel Note that this is almost always a bad idea,
Or you say that's the workaround to get around this for you? Still, it rather points to a misconfiguration. Also if you see paths like |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I have the following orm config for entity discovery. Since 6.2.2 and specifically due to this commit it now fails to discover my ts entity files
The error I get:
when debugging I notice it's trying to translate
./dist/src/shared/entities/batch.entity.js
to./dist/src/shared/entities/batch.entity.ts
but those are not in my sources array (because my source entities are not in dist ofcourse)I found a work around but it's far from ideal. Notice the 2 different patterns due to __dirname being different for node / ts-node
Reproduction
What driver are you using?
@mikro-orm/postgresql
MikroORM version
6.2.2
Node.js version
20.9.0
Operating system
MacOS
Validations
Beta Was this translation helpful? Give feedback.
All reactions