Cannot find name 'Headers', 'RequestInit', 'Response'
Asked Answered
S

1

9

I updated my nativescript from the 2.5.2 to the 3.0.3. And suddenly when I try to run the app I get the following errors:

node_modules/tns-core-modules/tns-core-modules.d.ts(17,27): error TS2304: Cannot find name 'Headers'.

node_modules/tns-core-modules/tns-core-modules.d.ts(19,44): error TS2304: Cannot find name 'RequestInit'.

node_modules/tns-core-modules/tns-core-modules.d.ts(19,66): error TS2304: Cannot find name 'Response'.

I don't understand why, because I think I'm not using this modules in my project.

Thanks! :)

Shindig answered 9/6, 2017 at 17:1 Comment(1)
Update your NativeScript-TypeScript plugin. - npm i -D nativescript-dev-typescript@latestDisappoint
P
19

add to tsconfig

  "compilerOptions": {
    "lib": [
      "es2017",
      "dom"
    ]
  }
Persse answered 7/8, 2017 at 6:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.