-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
TypeScript compile error due to typings #7369
Comments
http://stackoverflow.com/questions/35776470/typescript-compile-error-due-to-typings Please post a link when you crosspost so we don't duplicate effort |
Your typings in |
Same problem here with typings 0.6.9, tsc.exe 1.8.2, launched in Visual Studio from MSBuild.exe through the TypeScript 1.8.4 for Visual Studio 2015 extension ("Compile TypeScript on build").
... then the compilation fails because the TypeScript compiler "Cannot find name", which seems right enough. But if I selectively exclude all the subcontent of the same typings directory :
... then I get hundreds of Duplicate identifier errors. Same thing with this exclude section (just with twice as many errors) :
But with this last configuration, the build succeeds with the tsc 1.8.7 node module. Edit: And the only s are in main.d.ts and browser.d.ts. Edit: Deleting either the main.d.ts or the browser.d.ts file, along with its associated folder, "solves" the problem until the next typings install. |
@rendmath, the issue you describe sounds a lot like #7198. file names in the exclude were not correctly excluded. can you try TS 1.8.5 (https://github.com/Microsoft/TypeScript/releases/tag/v1.8.7) and see if it does address the issue? |
Yes, it absolutely solves my problem. The TypeScript 1.8.6 for Visual Studio 2015 extension doesn't show up in the Visual Studio Gallery, which led me to think that I had the latest version. That was wrong. Thank you very much for you help. |
thanks for that. it should show up shortly. |
As described above, and to clarify: you need to either exclude {
"exclude": [ "typings/browser", "typings/browser.d.ts" ]
}
// or
{
"files": [ "typings/main.d.ts" ]
} Referencing the issue on typings: This behavior will change soon. |
I was not aware there were duplicate typings in "node_modules/angular2/typing" and "typings" directory. Deleting duplicate typings solved my problem |
|
I'm using typescript 1.7.5, typings 0.6.9 and angular 2.0.0-beta.0.
How can I get rid of the typescript compile error messages
Duplicate identifier
due to typings definition files?The
Duplicate identifier
error occurs in the definition files of the following directories:What's the compiler doing in
node_modules/angular2
directory since I excluded it intsconfig.json
?I also posted this question on StackOverflow
tsconfig.json
They are gone if I change the
exclude
part oftsconfig.json
:But then after adding the following I get again the same
Duplicate identifier
compile errors:typings.json
The text was updated successfully, but these errors were encountered: