error TS2304: Cannot find name 'Promise'

解决方法:在编译选项中加入"target":"es6"

{
  "version":"2.13.0",
  "compilerOptions": {
    "target": "es6", //<- change here
    ......
  },
  "exclude": [
        "node_modules"
    ]
}

 TS2307: Cannot find module '**'
解决方法:在编译选项中加入下列选项

{
  "compilerOptions": {
    "target": "es6",
    "allowJs": true,
    "sourceMap": true,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2021-09-13
  • 2021-10-17
猜你喜欢
  • 2022-12-23
  • 2021-09-30
  • 2021-05-17
  • 2021-11-01
  • 2021-10-14
  • 2021-06-04
相关资源
相似解决方案