Issue 1:
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.

Issue 2:
I tried using the @types/lodash package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I'm getting this Error from TypeScript-> TypeScript compiler failed with exit code 1.

I did try your solution remove node_modules and run npm i but after tns run ios again same Error popping up

Thank you...

My package JSON

"dependencies": {

"@types/lodash": "^4.14.39",

"lodash": "^4.17.2",

},

///// -- ERROR

node_modules/@types/lodash/index.d.ts(19507,15): error TS2428: All declarations of 'WeakMap' must have identical type parameters.

node_modules/@types/node/index.d.ts(38,11): error TS2300: Duplicate identifier 'MapConstructor'.

node_modules/@types/node/index.d.ts(40,11): error TS2300: Duplicate identifier 'SetConstructor'.

node_modules/@types/node/index.d.ts(50,14): error TS2687: All declarations of 'iterator' must have identical modifiers.

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'.

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'.

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'.

node_modules/@types/node/index.d.ts(4091,5): error TS2309: An export assignment cannot be used in a module with other exported elements.

node_modules/tns-core-modules/declarations.d.ts(3,15): error TS2300: Duplicate identifier 'Request'.

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; }'.

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'.

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'.

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'.

node_modules/tns-core-modules/declarations.d.ts(36,15): error TS2300: Duplicate identifier 'Headers'.

node_modules/tns-core-modules/declarations.d.ts(46,5): error TS2687: All declarations of 'bodyUsed' must have identical modifiers.

node_modules/tns-core-modules/declarations.d.ts(56,15): error TS2300: Duplicate identifier 'Response'.

node_modules/tns-core-modules/declarations.d.ts(72,5): error TS2687: All declarations of 'status' must have identical modifiers.

node_modules/tns-core-modules/declarations.d.ts(73,5): error TS2687: All declarations of 'statusText' must have identical modifiers.

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'.

node_modules/tns-core-modules/declarations.d.ts(74,5): error TS2687: All declarations of 'headers' must have identical modifiers.

node_modules/tns-core-modules/declarations.d.ts(78,14): error TS2300: Duplicate identifier 'BodyInit'.

node_modules/tns-core-modules/declarations.d.ts(79,14): error TS2300: Duplicate identifier 'RequestInfo'.

node_modules/tns-core-modules/es-collections.d.ts(30,14): error TS2300: Duplicate identifier 'MapConstructor'.

node_modules/tns-core-modules/es-collections.d.ts(31,14): error TS2300: Duplicate identifier 'SetConstructor'.

node_modules/tns-core-modules/es6.d.ts(9,5): error TS2687: All declarations of 'iterator' must have identical modifiers.

node_modules/typescript/lib/lib.d.ts(5327,5): error TS2687: All declarations of 'status' must have identical modifiers.

node_modules/typescript/lib/lib.d.ts(5328,5): error TS2687: All declarations of 'statusText' must have identical modifiers.

node_modules/typescript/lib/lib.d.ts(5329,5): error TS2687: All declarations of 'headers' must have identical modifiers.

node_modules/typescript/lib/lib.d.ts(11168,11): error TS2300: Duplicate identifier 'Headers'.

node_modules/typescript/lib/lib.d.ts(11177,13): error TS2300: Duplicate identifier 'Headers'.

node_modules/typescript/lib/lib.d.ts(13566,11): error TS2300: Duplicate identifier 'Request'.

node_modules/typescript/lib/lib.d.ts(13583,13): error TS2300: Duplicate identifier 'Request'.

node_modules/typescript/lib/lib.d.ts(13588,11): error TS2300: Duplicate identifier 'Response'.

node_modules/typescript/lib/lib.d.ts(13599,13): error TS2300: Duplicate identifier 'Response'.

node_modules/typescript/lib/lib.d.ts(17714,14): error TS2687: All declarations of 'bodyUsed' must have identical modifiers.

node_modules/typescript/lib/lib.d.ts(19121,6): error TS2300: Duplicate identifier 'BodyInit'.

node_modules/typescript/lib/lib.d.ts(19152,6): error TS2300: Duplicate identifier 'RequestInfo'.

TypeScript compiler failed with exit code 1

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @....