HelloWorld tutorial app type failure


#1

I just followed the setup guide and Initialize the HelloWorld app. And the typescript compiler fails with several error

Found peer TypeScript 2.1.6
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/@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(49,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(73,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(85,13): error TS2403: Subsequent variable declarations must have the same type. Variable ‘module’ must be of type ‘NativeScriptModule’, but here has type ‘NodeModule’.

Anyone knows why?


#2

@triniwiz could you weigh in here? I feel like this is the references.d.ts file issue


#3

I would like to see the ref file


#4

the problematic files are under the folder node_modules/tns-core-modules. I only cloned them. I didn’t edit. Hence you would probably get the same file by just following the starting guide. there are several files. unless you wanna see the screen shot or me uploading the file somewhere, I think it’s better if i just point out the directory.