Skip to content
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

Duplicate identifier errors when using @types inside a Windows junction #11333

Closed
smrq opened this issue Oct 3, 2016 · 2 comments
Closed

Duplicate identifier errors when using @types inside a Windows junction #11333

smrq opened this issue Oct 3, 2016 · 2 comments
Labels
Fixed A PR has been merged for this issue

Comments

@smrq
Copy link

smrq commented Oct 3, 2016

TypeScript Version: 2.0.3

Code

  • Install any type declaration from @types on npm. (For this example I am using @types/react, but this is also reproducible with other declaration files: @types/angular, @types/jquery, @types/lodash, etc.)
  • Create a junction to the source folder.
  • Then, navigate into the junction (instead of the real folder).
  • Attempt to compile the following file:
import * as React from 'react';

A minimal reproducing repo with complete steps to reproduce is available here: https://github.com/smrq/tsc-junction-repro

Expected behavior:

Compiles without errors.

Actual behavior:

Compiles with the following errors:

C:/Code/tsc-junction-repro/node_modules/@types/react/index.d.ts(7,21): error TS2300: Duplicate identifier 'React'.
node_modules/@types/react/index.d.ts(7,21): error TS2300: Duplicate identifier 'React'.
@zkochan
Copy link

zkochan commented Oct 20, 2016

It would be really great if this was fixed.

As a consequence of this issue pnpm cannot currently be used for projects that use typescript@2 (related issue on pnpm).

By the way, pnpm is probably the only package manager written in TypeScript 😉

Please try to help us with this

@RyanCavanaugh RyanCavanaugh added Needs Investigation This issue needs a team member to investigate its status. and removed Needs Investigation This issue needs a team member to investigate its status. labels May 24, 2017
@sompylasar
Copy link

Looks relevant to this: #6496

@mhegazy mhegazy added Fixed A PR has been merged for this issue and removed Needs Investigation This issue needs a team member to investigate its status. labels Nov 9, 2017
@mhegazy mhegazy closed this as completed Nov 9, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

5 participants