microsoft / microsoft/TypeScript
Duplicate identifier errors when using @types inside a Windows junction
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.3k
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 117
Descripción
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 to y:\work
node: 13.5.0
npm: 6.13.4
tsc: 3.7.5
index.ts:
/// <reference path="node_modules/@types/youtube/index.d.ts" />
package.json:
{
"name": "junction-bug",
"scripts": {
"tsc": "tsc index.ts"
},
"devDependencies": {
"@types/youtube": "0.0.38",
"typescript": "^3.7.5"
}
}
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 to y:\ in the output below:
e:\work\junction-bug>dir e:\ | findstr work
04/19/2016 09:02 AM <JUNCTION> work [y:\work]
e:\work\junction-bug>npm i
...
e:\work\junction-bug>findstr /s /i /c:"y:\\" *
e:\work\junction-bug>npm run tsc
> junction-bug@ tsc E:\work\junction-bug
> tsc index.ts
node_modules/@types/youtube/index.d.ts:16:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: UNSTARTED, ENDED, PLAYING, PAUSED, BUFFERING, CUED, InvalidParam, Html5Error, VideoNotFound, EmbeddingNotAllowed, EmbeddingNotAllowed2, AlwaysVisible, HideAllControls, HideProgressBar, NoAutoPlay, AutoPlay, UserDefault, ForceOn, ProgressBarColor, Hide, ShowLoadPlayer, ShowDelayLoadPlayer, Enable, Disable, Show, ListType, ListTypePlayer, ListTypeSearch, ListTypeUserUploads, SinglePlay, Loop, Full, Modest, Fullscreen, Inline, SuggestedVideoQuality, VideoQualityDefault, VideoQualitySmall, VideoQualityMedium, VideoQualityLarge, VideoQualityHD720, VideoQualityHD1080, VideoQualityHighRes, Player
16 declare namespace YT
~~~~~~~
y:/work/junction-bug/node_modules/@types/youtube/index.d.ts:16:1
16 declare namespace YT
~~~~~~~
Conflicts are in this file.
y:/work/junction-bug/node_modules/@types/youtube/index.d.ts:16:1 - error TS6200: Definitions of the following identifiers conflict with those in
another file: UNSTARTED, ENDED, PLAYING, PAUSED, BUFFERING, CUED, InvalidParam, Html5Error, VideoNotFound, EmbeddingNotAllowed, EmbeddingNotAllowed2, AlwaysVisible, HideAllControls, HideProgressBar, NoAutoPlay, AutoPlay, UserDefault, ForceOn, ProgressBarColor, Hide, ShowLoadPlayer, ShowDelayLoadPlayer, Enable, Disable, Show, ListType, ListTypePlayer, ListTypeSearch, ListTypeUserUploads, SinglePlay, Loop, Full, Modest, Fullscreen, Inline, SuggestedVideoQuality, VideoQualityDefault, VideoQualitySmall, VideoQualityMedium, VideoQualityLarge, VideoQualityHD720, VideoQualityHD1080, VideoQualityHighRes, Player
16 declare namespace YT
~~~~~~~
node_modules/@types/youtube/index.d.ts:16:1
16 declare namespace YT
~~~~~~~
Conflicts are in this file.
Found 2 errors.
Related Issues: 113333
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comience con el index.ts y package.json proporcionados en un proyecto de Windows donde e:\work es una junction a y:\work; después, ejecute npm install y npm run tsc. Rastree cómo el compilador resuelve el node_modules/@types/youtube/index.d.ts referenciado y verifique que el mismo archivo no se notifique con ambas rutas; se considera terminado cuando ya no se producen errores de identificador duplicado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- node.js, typescript
- Área
- compilers, operating-systems
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100