<p dir="auto">Typescript 2.2 started including fetch in the dom lib. So I'm now getting a bunch of duplicate definition errors when using typescript 2.2 with @types/isomorphic-fetch. Seems like adding a namespace fixes this issue.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I tried using the <code class="notranslate">@types/lodash</code> package and had problems.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I tried using the latest stable version of tsc. <a href="https://www.npmjs.com/package/typescript" rel="nofollow">https://www.npmjs.com/package/typescript</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I'm getting this Error from TypeScript-&gt; TypeScript compiler failed with exit code 1.</li>
</ul>
<p dir="auto">I did try your solution remove <code class="notranslate">node_modules</code> and run <code class="notranslate">npm i</code> but after <code class="notranslate">tns run ios</code> again same Error popping up</p>
<p dir="auto">Thank you...</p>
<p dir="auto">My package JSON<br>
"dependencies": {<br>
"@types/lodash": "^4.14.39",<br>
"lodash": "^4.17.2",<br>
},</p>
<p dir="auto">///// -- ERROR</p>
<p dir="auto">node_modules/@types/lodash/index.d.ts(19507,15): error TS2428: All declarations of 'WeakMap' must have identical type parameters.</p>
<p dir="auto">node_modules/@types/node/index.d.ts(38,11): error TS2300: Duplicate identifier 'MapConstructor'.</p>
<p dir="auto">node_modules/@types/node/index.d.ts(40,11): error TS2300: Duplicate identifier 'SetConstructor'.<br>
node_modules/@types/node/index.d.ts(50,14): error TS2687: All declarations of 'iterator' must have identical modifiers.<br>
node_modules/@types/node/index.d.ts(60,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'global' must be of type 'any', but here has type 'Global'.</p>
<p dir="auto">node_modules/@types/node/index.d.ts(84,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'NativeScriptRequire', but here has type 'NodeRequire'.</p>
<p dir="auto">node_modules/@types/node/index.d.ts(96,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'module' must be of type 'NativeScriptModule', but here has type 'NodeModule'.<br>
node_modules/@types/node/index.d.ts(4091,5): error TS2309: An export assignment cannot be used in a module with other exported elements.</p>
<p dir="auto">node_modules/tns-core-modules/declarations.d.ts(3,15): error TS2300: Duplicate identifier 'Request'.</p>
<p dir="auto">node_modules/tns-core-modules/declarations.d.ts(17,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'headers' must be of type 'any', but here has type 'string[] | Headers | { [index: string]: string; }'.<br>
node_modules/tns-core-modules/declarations.d.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'mode' must be of type 'string', but here has type 'RequestMode'.<br>
node_modules/tns-core-modules/declarations.d.ts(20,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'credentials' must be of type 'string', but here has type 'RequestCredentials'.<br>
node_modules/tns-core-modules/declarations.d.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'cache' must be of type 'string', but here has type 'RequestCache'.</p>
<p dir="auto">node_modules/tns-core-modules/declarations.d.ts(36,15): error TS2300: Duplicate identifier 'Headers'.<br>
node_modules/tns-core-modules/declarations.d.ts(46,5): error TS2687: All declarations of 'bodyUsed' must have identical modifiers.<br>
node_modules/tns-core-modules/declarations.d.ts(56,15): error TS2300: Duplicate identifier 'Response'.<br>
node_modules/tns-core-modules/declarations.d.ts(72,5): error TS2687: All declarations of 'status' must have identical modifiers.</p>
<p dir="auto">node_modules/tns-core-modules/declarations.d.ts(73,5): error TS2687: All declarations of 'statusText' must have identical modifiers.<br>
node_modules/tns-core-modules/declarations.d.ts(74,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'headers' must be of type 'any', but here has type 'HeaderInit'.</p>
<p dir="auto">node_modules/tns-core-modules/declarations.d.ts(74,5): error TS2687: All declarations of 'headers' must have identical modifiers.<br>
node_modules/tns-core-modules/declarations.d.ts(78,14): error TS2300: Duplicate identifier 'BodyInit'.</p>
<p dir="auto">node_modules/tns-core-modules/declarations.d.ts(79,14): error TS2300: Duplicate identifier 'RequestInfo'.<br>
node_modules/tns-core-modules/es-collections.d.ts(30,14): error TS2300: Duplicate identifier 'MapConstructor'.</p>
<p dir="auto">node_modules/tns-core-modules/es-collections.d.ts(31,14): error TS2300: Duplicate identifier 'SetConstructor'.<br>
node_modules/tns-core-modules/es6.d.ts(9,5): error TS2687: All declarations of 'iterator' must have identical modifiers.</p>
<p dir="auto">node_modules/typescript/lib/lib.d.ts(5327,5): error TS2687: All declarations of 'status' must have identical modifiers.</p>
<p dir="auto">node_modules/typescript/lib/lib.d.ts(5328,5): error TS2687: All declarations of 'statusText' must have identical modifiers.<br>
node_modules/typescript/lib/lib.d.ts(5329,5): error TS2687: All declarations of 'headers' must have identical modifiers.<br>
node_modules/typescript/lib/lib.d.ts(11168,11): error TS2300: Duplicate identifier 'Headers'.<br>
node_modules/typescript/lib/lib.d.ts(11177,13): error TS2300: Duplicate identifier 'Headers'.<br>
node_modules/typescript/lib/lib.d.ts(13566,11): error TS2300: Duplicate identifier 'Request'.<br>
node_modules/typescript/lib/lib.d.ts(13583,13): error TS2300: Duplicate identifier 'Request'.<br>
node_modules/typescript/lib/lib.d.ts(13588,11): error TS2300: Duplicate identifier 'Response'.</p>
<p dir="auto">node_modules/typescript/lib/lib.d.ts(13599,13): error TS2300: Duplicate identifier 'Response'.<br>
node_modules/typescript/lib/lib.d.ts(17714,14): error TS2687: All declarations of 'bodyUsed' must have identical modifiers.<br>
node_modules/typescript/lib/lib.d.ts(19121,6): error TS2300: Duplicate identifier 'BodyInit'.</p>
<p dir="auto">node_modules/typescript/lib/lib.d.ts(19152,6): error TS2300: Duplicate identifier 'RequestInfo'.</p>
<p dir="auto">TypeScript compiler failed with exit code 1</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/blog/821-mention-somebody-they-re-notified">Mention</a> the authors (see <code class="notranslate">Definitions by:</code> in <code class="notranslate">index.d.ts</code>) so they can respond.
<ul dir="auto">
<li>Authors: @....</li>
</ul>
</li>
</ul>