Search code examples
node.jsjsontypescriptes6-shim

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


Im getting the following error when i run the typescipt command:

tsc -p ./

Im getting this error in es6-shim and other node packages

enter image description here

Following is my 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"
    ]
}

Solution

  • I just removed the "@types/es6-shim": "^0.31.32" from the package.json

    as i was targetting es6 already in tsconfig.json