Closed EmptySpace99 closed 1 month ago
Hey 👋
Try adding up()
to and running this migration using npx tsx <filepath>
, does it still happen?
Can you provide a reproduction repository?
I created one: https://github.com/EmptySpace99/test-kysely-ctl
Thanks for the reproduction. I was able to debug and think that https://github.com/kysely-org/kysely/pull/1031 should solve it - it did on my machine.
You should patch kysely
in your project for now following the changes in that PR using something like https://www.npmjs.com/package/patch-package OR https://pnpm.io/cli/patch.
This doesn't happen when turning the project to ESM ("type": "module"
in package.json
), so you could migrate instead.
Thank you so much, effectively turning the project to ESM fix the problem. Probably this is the easiest fix for now, hope that the real fix will be merged soon. 💪🏻
I created the following migration file:
And then I tried to run the migration with
npm run kysely migrate:up
but it failed with the following error message:If I remove the following code and retry the migration, it completes successfully:
In my kysely.config.ts file I have the following code:
It seems a bug to me but I'm not sure if I'm missing something else.