I am currently working on developing a .NET Core application using Angular2, but I keep encountering the following error:
/wwwroot/NodeLib/gulp-tsc/src/compiler.ts' not found.
I'm having trouble pinpointing what I might be missing.
tsconfig.json
{
"compileOnSave": true,
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"outDir": "../wwwroot/app",
"types": []
},
"exclude": [
"node_modules",
"wwwroot"
]
}
package.json
{
"name": "angular2withvs2015",
"version": "1.0.0",
"dependencies": {
"@angular/common": "~2.1.1",
"@angular/compiler": "~2.1.1",
"@angular/core": "~2.1.1",
"@angular/forms": "~2.1.1",
"@angular/http": "~2.1.1",
"@angular/platform-browser": "~2.1.1",
"@angular/platform-browser-dynamic": "~2.1.1",
"@angular/router": "~3.1.1",
"@angular/upgrade": "~2.1.1",
"bootstrap": "3.3.7",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"zone.js": "^0.6.25"
},
"devDependencies": {
"gulp": "3.9.1",
"rimraf": "^2.5.4",
"gulp-typescript": "^3.1.2",
"typescript": "^2.0.7",
"gulp-tsc": "^1.2.5",
"@types/node": "6.0.40"
}
}
Gulp.js
var ts = require('gulp-typescript');
var gulp = require('gulp'),
rimraf = require('rimraf');
gulp.task('clean', function (cb) {
return rimraf('./wwwroot/NodeLib/', cb)
});
gulp.task('copy:lib', function () {
return gulp.src('node_modules/**/*')
.pipe(gulp.dest('./wwwroot/NodeLib/'));
});
gulp.task('copy:systemjs', function () {
return gulp.src('Scripts/systemjs.config.js')
.pipe(gulp.dest('./wwwroot/'));
});
var tsProject = ts.createProject('Scripts/tsconfig.json', {
typescript: require('typescript')
});
gulp.task('ts', function () {
var tsResult = gulp.src("Scripts/**/*.ts") // instead of gulp.src(...)
.pipe(tsProject());
return tsResult.js.pipe(gulp.dest('./wwwroot'));
});
gulp.task('watch', ['watch.ts']);
gulp.task('watch.ts', ['ts'], function () {
return gulp.watch('Scripts/**/*.ts', ['ts']);
});
gulp.task('default', ['watch']);