-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Duplicate identifier errors when using @types inside a Windows junction #36294
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
Comments
This is a major issue when using workspaces in Yarn 2 or Yarn 3! 🙂 I was able to create a minimally reproducible example: https://github.com/Bosch-Eli-Black/hardlink-typescript-collisions To reproduce the issue:
Sample of the errors:
Please let me know if you're able to reproduce the issue, using the above steps 🙂 |
@RyanCavanaugh Would you mind taking a look at this, when you have the chance? This bug is currently blocking us from upgrading our JS packages, because when we do, we're swamped with Error messages. |
@mhegazy , @billti , or @amcasey Would you be the ones to look into this? (Just tagging MS devs who I saw in the original bug report of this: #14565) Or maybe still @RyanCavanaugh ? 🙂 Sorry to bug. This is blocking us kind of badly. |
Any updates on this? I have tried what people recommended in other issues for previous VS versions with no luck. |
@halm0291 At the same time that I posted my last comment, I contacted Microsoft with a paid support request to ask about about both this and a related bug: https://developercommunity.visualstudio.com/t/vs2022-esproj-ignores-typeacquisition-setting/1639009 As far as I know, there's hasn't been much movement on this bug. The rep that I contacted said that she was able to reproduce the issue and would talk to the team. Let me follow up with her 🙂 Anyway, the good news is that there's a workaround: Open Visual Studio, go to Tools->Options->Text Editor-> JavaScript/TypeScript -> Project and uncheck "Enable automatic type acquisition (TS 4.1 or later)" (See https://developercommunity.visualstudio.com/t/vs2022-esproj-ignores-typeacquisition-setting/1639009#T-N1673400 for more details.) Hope that helps! 🙂 |
@Bosch-Eli-Black I looked into how we're handling that Visual Studio feedback ticket. For your case, the bug we're tracking is actually a problem specific to .esproj projects - we ignore For any non-VS scenario, that same fix won't apply. It sounds like OP @Spongman is talking about a command-line repro, so their issue probably has a different root cause. |
Yes, this issue has nothing to do with Visual Studio. All that's required is the typescript compiler (fetched here via npm). |
@minestarks Thanks for the update on that Visual Studio ticket – appreciate it! 🙂 Turning type acquisition off in VS is just a workaround for the TypeScript bug that's described in this issue. Ideally, this bug (#36294) would be fixed, too, so that I could still have autocomplete info 😀 |
Got it. I'm able to repro with @Spongman 's repro steps. There does seem to be a bug as to how we handle junctions. @Bosch-Eli-Black I think your repro is the victim of multiple different bugs - one, as I mentioned, is fixed in the next update the VS. The second one, where we included a lot of unnecessary typings (which caused all the unnecessary errors) was fixed in #47164 , which is in TS 4.6, which is also bundled in the next update to VS. With these two fixed, I think you won't even hit the third one, which is this bug :) |
@minestarks Ah, got it! 🙂 Thanks again :) |
@minestarks Upgrading to VS 17.2 Preview 2 fixed our issue 🙂 Thanks again for your help! |
By the way, sorry for derailing this bug so badly, @Spongman! I'd thought that the bug I was running into was the same as this one, but I guess not 🙂 |
This is a dupe of #11333, but that issue was marked as closed/fixed (and locked... why?). It's not. It should be reopened and actually fixed. It's also unrelated to 'npm link'.
IMPORTANT:
my
e:\work
directory is a JUNCTION point toy:\work
node: 13.5.0
npm: 6.13.4
tsc: 3.7.5
index.ts:
package.json:
NOTE: There is NO reference to 'y:' in any of my project's files, nor in any of npm's files.
tsc
is erroneously converting relative paths to absolute paths on the destination drive. look for references toy:\
in the output below:Related Issues: 113333
The text was updated successfully, but these errors were encountered: