While trying to compile my typescript source code, I see that the compiler is also trying to compile the types under my node_modules folder . I am using typescript 2.6.1 and my tsconfig file is as below
{
"compilerOptions": {
"allowSyntheticDefaultImports":true,
"outDir": "./dist",
"mapRoot": "./dist",
"module": "commonjs",
"target": "es6",
"sourceMap": true,
"sourceRoot": "./source",
"removeComments": false
},
"exclude": [
"node_modules",
"test"
],
"include": [
"source/*.ts"
]
}
When I run the following comand "tsc -w -p tsconfig.json" I get the following error
node_modules/@types/es6-promise/index.d.ts(11,15): error TS2300: Duplicate identifier 'Promise'.