Title: Project references result in multiple dual publish module resolutions · Issue #59456 · microsoft/TypeScript · GitHub
Open Graph Title: Project references result in multiple dual publish module resolutions · Issue #59456 · microsoft/TypeScript
X Title: Project references result in multiple dual publish module resolutions · Issue #59456 · microsoft/TypeScript
Description: 🔎 Search Terms “module resolution dual references” 🕗 Version & Regression Information This changed between versions 4.9 and 5.0 I was unable to test this on prior versions because `"moduleResolution": "bundler" was introduced in TypeScri...
Open Graph Description: 🔎 Search Terms “module resolution dual references” 🕗 Version & Regression Information This changed between versions 4.9 and 5.0 I was unable to test this on prior versions because `"moduleResolutio...
X Description: 🔎 Search Terms “module resolution dual references” 🕗 Version & Regression Information This changed between versions 4.9 and 5.0 I was unable to test this on prior versions because `"module...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/59456
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Project references result in multiple dual publish module resolutions","articleBody":"### 🔎 Search Terms\n\n“module resolution dual references”\n\n### 🕗 Version \u0026 Regression Information\n\n- This changed between versions 4.9 and 5.0\r\n- I was unable to test this on prior versions because `\"moduleResolution\": \"bundler\" was introduced in TypeScript 5.0.\r\n\n\n### ⏯ Playground Link\n\nhttps://github.com/remcohaszing/typescript-resolution-bug\n\n### 💻 Code\n\nSee 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.\r\n\r\nSteps to reproduce:\r\n\r\n```sh\r\ngit clone https://github.com/remcohaszing/typescript-resolution-bug.git\r\ncd typescript-resolution-bug\r\nnpm install\r\nnpx tsc -b repro\r\n```\n\n### 🙁 Actual behavior\n\n```\r\n$ tsc -b repro\r\nrepro/test/test.ts:4:12 - error TS2345: Argument of type 'import(\"/home/remco/Projects/typescript-resolution-bug/repro/node_modules/some-lib/index\").SomeType' is not assignable to parameter of type 'import(\"/home/remco/Projects/typescript-resolution-bug/repro/node_modules/some-lib/index\").SomeType'.\r\n Types have separate declarations of a private property 'property'.\r\n\r\n4 myFunction(new SomeType())\r\n ~~~~~~~~~~~~~~\r\n\r\n\r\nFound 1 error.\r\n```\n\n### 🙂 Expected behavior\n\nOne of the following:\r\n\r\n1. The reproduction is considered valid: does not contain type errors.\r\n2. The error shows the actual path of the resolved paths instead of stripping the file extension. Currently the paths in the error message are *exactly* the same. A nice side effect of this, is that the path becomes clickable in some terminal emulators.\n\n### Additional information about the issue\n\nRemoving `references` from `tsconfig.json` resolves the issue.\r\n\r\nA real world example is found in https://github.com/remcohaszing/codemirror-languageservice. Just search for `@ts-expect-error`.","author":{"url":"https://github.com/remcohaszing","@type":"Person","name":"remcohaszing"},"datePublished":"2024-07-29T14:15:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/59456/TypeScript/issues/59456"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0e308ae4-98b5-e771-7f75-7fae6b665d75 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFDE:3AA93C:F8715:14A425:6A5EC4D4 |
| html-safe-nonce | 62102d06385eaf961736e66e1512f876e638b366a98593db6ad3c31283b23ee9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkRFOjNBQTkzQzpGODcxNToxNEE0MjU6NkE1RUM0RDQiLCJ2aXNpdG9yX2lkIjoiNDkzMjM2OTk3NjcwNjEyMjk2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d1320fa95cf0f483cbabca920d7bf3cff2505c7f140fc975121c7d0efd218bb7 |
| hovercard-subject-tag | issue:2435554807 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/59456/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca880b50983ee129401172f420f079f29718b8e2aa33190d9c5cba21f7ccf56c/microsoft/TypeScript/issues/59456 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca880b50983ee129401172f420f079f29718b8e2aa33190d9c5cba21f7ccf56c/microsoft/TypeScript/issues/59456 |
| og:image:alt | 🔎 Search Terms “module resolution dual references” 🕗 Version & Regression Information This changed between versions 4.9 and 5.0 I was unable to test this on prior versions because `"moduleResolutio... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | remcohaszing |
| hostname | github.com |
| expected-hostname | github.com |
| None | fbe2b3a3baf2f0e0ac1671a4d190d9de098dcf218eb73137ad46da364d3df398 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0cd844a7ab298ec8d89b66ef4b195d158229d335 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width