8

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! :)

Community
  • 1
  • 1
Carlos
  • 91
  • 1
  • 4
  • 1
    Update your NativeScript-TypeScript plugin. - `npm i -D nativescript-dev-typescript@latest` – pkanev Jun 10 '17 at 23:34

1 Answers1

17

add to tsconfig

"lib": [
  "es2017",
  "dom"
]
b091
  • 519
  • 2
  • 7