找不到名称“标头”,“ RequestInit”,“响应”

Car*_*los 2 module header response nativescript angular2-nativescript

我将本机脚本从2.5.2更新到了3.0.3。突然,当我尝试运行该应用程序时,出现以下错误:

node_modules / tns-core-modules / tns-core-modules.d.ts(17,27):错误TS2304:找不到名称“ Headers”。

node_modules / tns-core-modules / tns-core-modules.d.ts(19,44):错误TS2304:找不到名称“ RequestInit”。

node_modules / tns-core-modules / tns-core-modules.d.ts(19,66):错误TS2304:找不到名称“ Response”。

我不明白为什么,因为我认为我没有在项目中使用此模块。

谢谢!:)

小智 5

添加到tsconfig

"lib": [
  "es2017",
  "dom"
]
Run Code Online (Sandbox Code Playgroud)