-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run-migration
is broken after ESM migration
#95
Comments
I am running into the same issue, but your "fix" using |
@OFranke, I have I use Hope that helps. |
@christianzoppi, can you please into it? |
Hey there @privetkuku @OFranke I'm currently checking out this issue. If I understand correctly, the problem comes when trying to run previously generated CJS versions of the migrations in the newest versions right? I guess it also depends on the Node version of the project if it's using |
Hello @alvarosabu, thanks for looking into it! |
Current behavior:
export default
ESM statementrun-migration
. Error will be thrown, because Node.js didn't expect to see ESM export in.js
fileExpected behavior:
Steps to reproduce:
Steps are described in Current behaviour section.
Related code:
Code that broke the functionality - 891af62#diff-2c9538c486ae6103ef79ac65657bf841191ae869f4992158328e6739c28e463c
Other information:
To fix the issue, you need to generate
.mjs
files, not.js
.Current "fix" for me is to use
--experimental-detect-module
flag, but that's not safe.The text was updated successfully, but these errors were encountered: