-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Fail compile when module is Node16/NodeNext while moduleResolution is Node #52428
Comments
This is a giant markdown file, not a reproducible sample. |
Added Repro steps in OP. The markdown is a summary of the tests, generated by running The steps in repo separate the demo into The code related to this issue are |
I just have to double-down here on needing a "clearly demonstrated defect" in order to proceed here, as discussed in other issues. I'm not going to poke at every cell of this giant matrix to try to make sense of it. Configuration is a wide-open space and the fact that you see a runtime error in some configuration doesn't necessarily mean that configuration doesn't correspond to some environment where it won't error. |
I'm not sure what other information I need to provide here. Please let me know what additional information I can provide. From #48835, it is marked as This issue is not a bug report, but a feature request to explicitly fail the compilation so that The steps mentioned in OP reproduced the issue, not just generating the markdown. The JS file produced are in CJS, instead of ESM as indicated by After running |
The linked repo has dozens of tsconfig files. It has a tool that appears to run TS under hundreds (?) of different configurations. What I want is a repro that contains a) all the files needed to reproduce the bug you're trying to tell me exists and b) not hundreds of other files as well. Maybe a textual description too. If literally all you want is for the combination of |
Fine. If you want just this case, here is the repro: https://github.com/cyberuni/TS-52428
Yes, that's what this feature request is about.
The original linked repo tries to demonstrate all scenarios when using various settings of the module resolution mechanism in TypeScript.
It's ok that if you don't like it. |
Can we remove the |
This issue has been marked as 'Unactionable' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Suggestion
When
module: Node16|NodeNext
andmoduleResolution: Node
,the compile pass but the result is invalid.
See: https://github.com/cyberuni/typescript-module-resolutions-demo/blob/main/tests/node/test-result.5.0.0-dev.20230103.md
Either this should be a bug to fix, or mark it as an invalid configuration and bail out.
So that there is no false impression that it works.
🔍 Search Terms
module moduleresolution node16 ReferenceError
This issue seems to be similar, but marked as
working as intended
: #48835This issue is about improving the situation to improve UX.
✅ Viability Checklist
Related to #52086
Repro steps
The text was updated successfully, but these errors were encountered: