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

TypeScript support? #204

Open
imkane opened this issue Jan 15, 2024 · 3 comments
Open

TypeScript support? #204

imkane opened this issue Jan 15, 2024 · 3 comments

Comments

@imkane
Copy link

imkane commented Jan 15, 2024

From reading past issues, it sounds like there's not much progress on this. Any timeline for it being introduced?

We've been using migrate for years, but recently started moving to TypeScript, and are getting errors like:

error : Error: Cannot find module '../models/payment_plan'

@imkane imkane changed the title TypeScript support TypeScript support? Jan 15, 2024
@muhammadyusuf-kurbonov
Copy link

Check this #108

@wesleytodd
Copy link
Collaborator

Happy to accept a PR to make this better. I am not sure I remember the status of #108 clearly, but I think we need more than the above error report to know specifically what needs to happen to fix it. Can you open a PR with a failing test which illustrates the problem?

@andyw88
Copy link

andyw88 commented May 28, 2024

Not sure where to add this, but for my project I was able to get Typescript running by using ts-node.

If your project is ESM only: then this is the command that worked for me:

TS_NODE_TRANSPILE_ONLY=true NODE_OPTIONS="--loader=ts-node/esm" npx migrate up

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

4 participants