nativescript-community / https

Secure HTTP client with SSL pinning for Nativescript - iOS/Android
https://nativescript-community.github.io/https/
Other
50 stars 42 forks source link

Fail to run application #4

Open dzfweb opened 7 years ago

dzfweb commented 7 years ago

I'm with the folowing to run the application after instalation.


node_modules/nativescript-https/index.d.ts(1,15): error TS2306: File 'C:/dev/fm-transportes/src/FM.Transportes/node_modules/nativescript-https/AFNetworking.d.ts' is not a module.

node_modules/nativescript-https/index.d.ts(2,15): error TS2306: File 'C:/dev/fm-transportes/src/FM.Transportes/node_modules/nativescript-https/com.squareup.okhttp3.d.ts' is not a module.

node_modules/tns-platform-declarations/ios/objc-i386/objc!UIKit.d.ts(4954,15): error TS2300: Duplicate identifier 'UIEvent'.

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

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

I've added the references.d.ts.

roblav96 commented 7 years ago

set your tsconfig.json to use es2016 libs.

zontafil commented 7 years ago

having the same issue. Adding es6 to libs results in the following error:

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/typescript/lib/lib.es2015.collection.d.ts(31,11): error TS2300: Duplicate identifier 'MapConstructor'.
node_modules/typescript/lib/lib.es2015.collection.d.ts(68,11): error TS2300: Duplicate identifier 'SetConstructor'.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(118,11): error TS2300: Duplicate identifier 'MapConstructor'.
node_modules/typescript/lib/lib.es2015.iterable.d.ts(135,11): error TS2300: Duplicate identifier 'SetConstructor'.

my tsconfig is

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "noEmitHelpers": true,
        "noEmitOnError": true,
        "noImplicitUseStrict": true,
        "skipLibCheck": true,
        "lib": [
            "es2016"
        ]
    },
    "exclude": [
        "node_modules",
        "platforms",
        "**/*.aot.ts"
    ]
}
shiamalon commented 7 years ago

Same issue as @m3l7...

roblav96 commented 7 years ago

@shiamalon tsconfig:

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "lib": [
            "es2016"
        ],
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "skipLibCheck": true,
        "skipDefaultLibCheck": true,
        "removeComments": true,
        "pretty": true
    }
}