Having trouble running a gulp task to compile my typescript due to dependency-related errors.
/content/node_modules/@angular/core/src/facade/lang.d.ts(12,17): error TS2304: Cannot find name 'Map'.
/content/node_modules/@angular/core/src/facade/lang.d.ts(13,17): error TS2304: Cannot find name 'Set'.
I'm attempting to exclude the node_modules directory in order to focus only on issues within my code. Here are my files:
gulpfile.js
var tsProject = ts.createProject('tsconfig.json');
gulp.task('ts', function () {
return gulp.src([aemPaths.jcrRoot + '**/*.ts'])
.pipe(tsProject())
.pipe(gulp.dest(aemPaths.jcrRoot));
});
I've also tried
gulp.task('ts', function () {
return gulp.src([aemPaths.jcrRoot + '**/*.ts','!node_modules/**/*'])
.pipe(tsProject())
.pipe(gulp.dest(aemPaths.jcrRoot));
});
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true
},
"exclude": [
"node_modules"
]
}
Despite my efforts and searches, I can't seem to figure out how to exclude this using gulp-typescript. Any assistance would be greatly appreciated.