-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
typeorm-ts-node-commonjs doesnt work #8824
Comments
Also, the scaffold generated an Entity:
And Typescript doesnt seem to recognize typeorm types. Could not find a declaration file for module 'typeorm'. '/home/mgarcia/projects/compliance-backend-api/node_modules/typeorm/index.js' implicitly has an 'any' type. |
I have the same issue. typeorm-ts-node-esm is broken in the same way. |
adding @giladgd |
@matiasgarcia I'm curious what your "typeorm" script looks like in your package.json...if you posted it, I'm not seeing it sorry ;) |
PR #8821 fixes this, once a new version is released this should be solved |
I tried everything:
My project compiles to commonjs so I guess the first option is fine but still. |
I tried following the guidelines in https://github.com/typeorm/typeorm/blob/master/docs/using-cli.md#if-entities-files-are-in-typescript FYI |
Is there any workaround for this in the meantime? |
See #8810 After researching a few issues here I got it working |
I was on typeorm v0.3.4 with the same issue. I upgraded to v0.3.6 and the problem went away, thanks to #8821 (fixed in 0.3.5 actually). |
no luck for me, tried almost everything ... ESM support is terrible |
Migrations with typerom still a big mess ! |
@ItsTarik Were you able to fix that? |
@marcel-mintouge i am done with typeorm for good(issues from 2019 are still present with a new look), I migrated to drizzle-orm 👌 so good luck to everyone ! |
It worked for me in the end with
|
@marcel-mintouge it is OK if it doesn't bother you, but for me why should i switch to relative imports ? i prefer to avoid limited solutions. And i think that something similar to |
Issue Description
I am trying to run the typeorm cli using typeorm-ts-node-commonjs to generate migrations and it doesn't work.
Expected Behavior
It should work.
Actual Behavior
Steps to Reproduce
My Environment
Additional Context
I used npx typeorm init in my current project.
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: