Replies: 2 comments 4 replies
-
Can you share your setup? I was actually trying out bun few days ago and it didn't really work for me, but I guess I only tried (both) sqlite drivers. The second problem seems to be worth reporting to bun, I believe the first one is a known issue, saw something like that recently. |
Beta Was this translation helpful? Give feedback.
4 replies
-
#5349 this one has a better workaround for now |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I guess this is a bun issue and not mikro-orm, but maybe somebody has an idea how to solve this. I'm using bun v1.0.4 with mikro-orm v5.8.6 and postgres driver. Everything is working, expect of the migrator. I get the following error:
I found out the following two things:
First
node_modules look like this after a clean bun install:
If i change it to add a node_modules folder under migrations with core like this, then the migration will work:
i found this out since currently bun install does not handle upgrading the version correctly. If i change the version of mikro-orm to some other version and run
bun install
it will install the versions correctly on the root @mikro-orm/*** level but will install some other versions of the peer dependencies inside the node_modules folder of the mikro-orm packages. But this is not correct and also cause typescript errors, so currently i just delete the bun lock file and the node modules folder and runbun install
, then the structure is flat again without additional versions being installed.Second
If i go inside the Migrator class and log the migrations object from the dynamic Import i get:
and if i log
Object.values(migration)
i get[]
.If i change
const MigrationClass = Object.values(migration)[0];
toconst MigrationClass = migration.Migration20230304144659
then it will also work for this specific migration file of course.Beta Was this translation helpful? Give feedback.
All reactions