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
  }

 

posted on 2017-02-11 09:50  百里登风  阅读(2642)  评论(0编辑  收藏  举报