0

运行 typecipt 命令时出现以下错误:

tsc -p ./

我在 es6-shim 和其他节点包中遇到此错误

在此处输入图像描述

以下是我的package.json

"scripts": {
    "vscode:prepublish": "tsc -p ./",
    "compile": "tsc -watch -p ./",
    "postinstall": "node ./node_modules/vscode/bin/install"
  },
 "devDependencies": {
    "typescript": "^2.0.3",
    "vscode": "^1.0.0"
  },
  "dependencies": {
    "@types/es6-shim": "^0.31.32",
    "@types/node": "^6.0.45",
    "adm-zip": "^0.4.7",
    "fs": "^0.0.2",
    "github": "^2.6.0",
    "ncp": "^2.0.0",
    "node-watch": "0.4.0",
    "open": "^0.0.5",
    "rimraf": "^2.5.4",
    "temp": "^0.8.3"
  }

TSCONFIG.json

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es6",
        "outDir": "out",
        "lib": [
            "es6"
        ],
        "sourceMap": true,
        "rootDir": "."
    }, 
    "exclude": [
        "node_modules",
        ".vscode-test"
    ]
}
4

1 回答 1

0

我刚刚"@types/es6-shim": "^0.31.32"从 package.json中删除了

因为我已经在 tsconfig.json 中针对 es6

于 2016-10-17T15:10:50.670 回答