You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have VS solution that has multiple projects.
There is a ProjectA that imports jquery and knockout and ProjectB that imports class from ProjectA and also imports knockout and jquery.
When I compile the solution (or projectB) in VS 2015 Update 3 with TS 2.0.6 installed I get the below errors.
2>D:\Temp\TSProject\TSProjectA\node_modules\@types\jquery\index.d.ts(623,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\jquery\index.d.ts(2872,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\jquery\index.d.ts(2873,5): error TS2375: Build:Duplicate number index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\jquery\index.d.ts(3246,5): error TS2300: Build:Duplicate identifier 'export='. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(8,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(14,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(18,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(38,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(160,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(682,2): error TS2300: Build:Duplicate identifier 'export='. 2>D:\Temp\TSProject\TSProjectMain\node_modules\@types\jquery\index.d.ts(3246,5): error TS2300: Build:Duplicate identifier 'export='. 2>D:\Temp\TSProject\TSProjectMain\node_modules\@types\knockout\index.d.ts(682,2): error TS2300: Build:Duplicate identifier 'export='.
I have attached a simplified solution where the issue is reproducible.
The declaration files for Jquery and knockout are declared in the global scope. this means that there is only one of them that can exist at a time. this results to conflicts once two files exist on disk.
The correct fix is to update the declaration files to be authored as modules instead of global, since they are rely not global.
as a workaround, you can add a path mapping entry in your tsconfig.json to make sure the second set of files are never loaded.
I have VS solution that has multiple projects.
There is a ProjectA that imports jquery and knockout and ProjectB that imports class from ProjectA and also imports knockout and jquery.
When I compile the solution (or projectB) in VS 2015 Update 3 with TS 2.0.6 installed I get the below errors.
2>D:\Temp\TSProject\TSProjectA\node_modules\@types\jquery\index.d.ts(623,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\jquery\index.d.ts(2872,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\jquery\index.d.ts(2873,5): error TS2375: Build:Duplicate number index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\jquery\index.d.ts(3246,5): error TS2300: Build:Duplicate identifier 'export='. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(8,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(14,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(18,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(38,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(160,5): error TS2374: Build:Duplicate string index signature. 2>D:\Temp\TSProject\TSProjectA\node_modules\@types\knockout\index.d.ts(682,2): error TS2300: Build:Duplicate identifier 'export='. 2>D:\Temp\TSProject\TSProjectMain\node_modules\@types\jquery\index.d.ts(3246,5): error TS2300: Build:Duplicate identifier 'export='. 2>D:\Temp\TSProject\TSProjectMain\node_modules\@types\knockout\index.d.ts(682,2): error TS2300: Build:Duplicate identifier 'export='.
I have attached a simplified solution where the issue is reproducible.
TSProject.zip
Seems to be related to issue #10968.
The text was updated successfully, but these errors were encountered: