-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Project references result in multiple dual publish module resolutions #59456
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
Labels
Duplicate
An existing issue was already created
Comments
remcohaszing
added a commit
to remcohaszing/codemirror-languageservice
that referenced
this issue
Jul 30, 2024
The TypeScript `module` option `preserve` is more correct for use with bundlers or vitest, but it causes a TypeScript issue. As a result, the code had to be scattered with `@ts-expect-error` comments, which is a trade-off worse than setting `module` to `node16`. Refs microsoft/TypeScript#59456
I applied a workaround to the real world project: I set the |
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🔎 Search Terms
“module resolution dual references”
🕗 Version & Regression Information
⏯ Playground Link
https://github.com/remcohaszing/typescript-resolution-bug
💻 Code
See the repo. It’s not big, but it contains a bunch of small files that’s inconvenient and not useful to paste in the issue report.
Steps to reproduce:
git clone https://github.com/remcohaszing/typescript-resolution-bug.git cd typescript-resolution-bug npm install npx tsc -b repro
🙁 Actual behavior
🙂 Expected behavior
One of the following:
Additional information about the issue
Removing
references
fromtsconfig.json
resolves the issue.A real world example is found in https://github.com/remcohaszing/codemirror-languageservice. Just search for
@ts-expect-error
.The text was updated successfully, but these errors were encountered: