Skip to content
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

Use with ES6 modules #179

Open
georgeben opened this issue Sep 8, 2020 · 2 comments
Open

Use with ES6 modules #179

georgeben opened this issue Sep 8, 2020 · 2 comments

Comments

@georgeben
Copy link

I have installed babel-register. However, when I run
migrate up --compiler="js:babel-register"
I get the error:

Error: Cannot find module 'babel-register'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at registerCompiler (/usr/local/lib/node_modules/migrate/lib/register-compiler.js:12:3)
    at Object.<anonymous> (/usr/local/lib/node_modules/migrate/bin/migrate-up:57:3)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

Please what am I doing wrong? I would appreciate any help. Thanks for this package @tj

@wesleytodd
Copy link
Collaborator

Hm, well I am not sure this has to do with ESM, the register-compiler cannot find the package. I would need more info to help debug, do you have a repo I could look at?

@Ti-webdev
Copy link

My pull request added support es6 modules without compiler
You can use es6 modules in migrations with nodejs>=v12

#185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants