简体   繁体   English

打字稿命令tsc -p ./在打字模块中显示错误

[英]typescript command tsc -p ./ shows error in typings modules

Im getting the following error when i run the typescipt command: 我在运行typescipt命令时收到以下错误:

tsc -p ./

Im getting this error in es6-shim and other node packages 我在es6-shim和其他节点程序包中收到此错误

在此处输入图片说明

Following is my package.json 以下是我的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 TSCONFIG.json

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

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

as i was targetting es6 already in tsconfig.json 因为我已经在tsconfig.json中瞄准了es6

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM