-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Unable to find module with tsconfig-paths when using esm: tsconfig-paths is incompatible with native ESM #1375
Comments
Experiencing the same issue. It works in version 9.1.1. Stopped working in version 10.0.0 |
Unfortunately i tried 9.1.1,doesnt work too |
tsconfig-paths does not support native ESM. Ts-node 9.1.1 has a limitation
where it will allow you to (silently, accidentally) use CommonJS when you
think you are using native ESM. Projects that are accidentally taking
advantage of this behavior may find that things break on ts-node 10, since
ts-node 10 fixes this flaw.
When ts-node 9 silently runs your code as CommonJS, and tsconfig-paths is
compatible with CommonJS, then things work.
Fixes are either:
- add native ESM support to tsconfig-paths
- use CommonJS
…On Wed, Jun 23, 2021, 2:59 AM SAI ***@***.***> wrote:
Experiencing the same issue. It works in version 9.1.1. Stopped working in
version 10.0.0
Unfortunately i tried 9.1.1,doesnt work too
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1375 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC35OEVKJAQRGRQYWK3RC3TUGA5VANCNFSM47AALGWQ>
.
|
thanks a lot , i think i'll use commonjs |
You could also, bend your code to support relative imports... You may have to move it around if you use unpredictable, and that may break tests, linters transpilers ... I've just been living without typescript linting where I can't make it work yet. |
Expected Behavior
tsconfig-paths can read my alias in
tsconfig.json
Actual Behavior
tsconfig-paths can't read my alias in
tsconfig.json
Steps to reproduce the problem
i use nodemon,here is my modemon.json
Minimal reproduction
just run
nodemon
Specifications
10.0.0
16.0.0
4.3.2
macos big sur 11.4
The text was updated successfully, but these errors were encountered: