While running a typescript build, I encountered errors in the node_modules folder. Despite having it listed in the exclude section of my tsconfig.json file, the errors persist. What's puzzling is that another project with identical gulpfile.js, tsconfig.json, and node_modules folders doesn't throw these errors. What other factors should I investigate?
The errors are as follows:
c:/Dev/streak-maker/node_modules/angular2/src/core/change_detection/parser/locals.d.ts(3,14): error TS2304: Cannot find name 'Map'.
c:/Dev/streak-maker/node_modules/angular2/src/core/change_detection/parser/locals.d.ts(4,42): error TS2304: Cannot find name 'Map'.
... (additional error list)
Here is an excerpt from my tsconfig.json file:
{
"version": 3,
"compilerOptions": {
"target": "es5",
"module": "system",
"moduleResolution": "node",
"sourceMap": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"jspm_packages"
]
}
Additionally, here is the relevant part of my gulpfile.js where I'm executing the build-typescript task:
/// <binding Build='default' />
var del = require('del'),
gulp = require("gulp"),
ts = require('gulp-typescript'),
watch = require('gulp-watch');
... (remaining code)