gulp-typescript: Duplicate source in path
Debug information: sourceRoot = “/pathToProject/Project/source/” sources = [“source/controllers/SchemaController.ts”] Could not find input file /pathToProject/project/source/source/models/IModel.ts. This is probably an issue of gulp-typescript. Please report it at https://github.com/ivogabe/gulp-typescript/issues
Expected behavior: In gulp-typescript 2.11.0 it compiles properly
Actual behavior: In gulp-typescript 2.12.1 the path is decorated with source another time
Your gulpfile:
Include your gulpfile, or only the related task (with ts.createProject
).
// gulp.sourceDir evaluates to ./source
var sourceDir = path.join(__dirname, config.get('gulp.sourceDir'));
gulp.task('compile', function() {
var tsResult = gulp.src(sourceDir + '/**/*.ts')
.pipe(ts(tsProject));
return tsResult.js
.pipe(sourcemaps.write())
.pipe(gulp.dest(buildDestination));
});
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 37 (15 by maintainers)
Commits related to this issue
- Handle rootDir correctly (#307) — committed to ivogabe/gulp-typescript by ivogabe 8 years ago
- Set base and root correctly when convertCompilerOptionsFromJson is used, #307 — committed to ivogabe/gulp-typescript by ivogabe 8 years ago
I think I can reproduce it very simple with the mgechev/angular2-seed project as described with my comment in issue mgechev/angular2-seed#1145. owner of the angular2-seed project directed me to this issue and it probably is the same. I’m don’t know whats going on under the hood, so I can’t really isolate the problem better. But hope my reproducible test case can help.
test-case copy from the original issue:
git clone https://github.com/mgechev/angular2-seed.git
cd .\angular2-seed
npm install
npm start
-> no errorsapp.module.ts
without changes -> reloaded without errorsnpm install angular2-busy --save
app.module.ts
(adding import of service and added to providers):npm start
-> no errorsapp.module.ts
without changes -> reloaded with errors:Having the same issue using angular2-seed. Symptoms and reproduce steps are the same as @spali
I’m having the same issue 😦 My project is using angular2-seed. Just update to newest version ( rc6 ) and get a lot of errors like this. But it only happen when I change html file, it’s working when I change ts file.
I’m having the same issue
Actually, I still get an error, but at least this time it doesn’t make my gulp task fail. My configs are the same as the one posted I previously, but the logs that I’m posting are from my production server as oppose to my dev server (although I also get this error on my dev server) because I wanted to take the opportunity to point to another bug that only occurs on my prod server.
The following error is similar to the issue that I posted previously (occurs both on dev and prod servers):
Additionally, on my prod server only, it seems that it’s trying to transpile files that I have excluded (see my
tsconfig.json
above):Note that my
tsconfig.json
is located at/app
on my prod server.