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

Most upvoted comments

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:

  1. git clone https://github.com/mgechev/angular2-seed.git
  2. cd .\angular2-seed
  3. npm install
  4. npm start -> no errors
  5. touched file app.module.ts without changes -> reloaded without errors
  6. killed npm process
  7. npm install angular2-busy --save
  8. modified app.module.ts (adding import of service and added to providers):
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { APP_BASE_HREF } from '@angular/common';
import { RouterModule } from '@angular/router';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';
import { routes } from './app.routes';

import { AboutModule } from './+about/about.module';
import { HomeModule } from './+home/home.module';
import { SharedModule } from './shared/shared.module';
import { BusyService } from 'angular2-busy';

@NgModule({
  imports: [BrowserModule, HttpModule, RouterModule.forRoot(routes), AboutModule, HomeModule, SharedModule.forRoot()],
  declarations: [AppComponent],
  providers: [{
    provide: APP_BASE_HREF,
    useValue: '<%= APP_BASE %>'
  },
  BusyService],
  bootstrap: [AppComponent]

})

export class AppModule { }
  1. npm start -> no errors
  2. touched file app.module.ts without changes -> reloaded with errors:
[13:33:29] Starting 'build.js.dev'...
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\shared\name-list\name-list.service.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\shared\\name-list\\name-list.service.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\shared\name-list\index.ts. This is probably an issue of gulp-typescript.

Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\shared\\name-list\\index.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\shared\navbar\navbar.component.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\shared\\navbar\\navbar.component.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\shared\navbar\index.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\shared\\navbar\\index.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\shared\toolbar\toolbar.component.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\shared\\toolbar\\toolbar.component.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\shared\toolbar\index.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\shared\\toolbar\\index.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\shared\config\env.config.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\shared\\config\\env.config.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\shared\index.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\shared\\index.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\app.component.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\app.component.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\+about\about.component.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\+about\\about.component.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\+about\about.routes.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\+about\\about.routes.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\+about\index.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\+about\\index.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\+home\home.component.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\+home\\home.component.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\+home\home.routes.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\+home\\home.routes.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\+home\index.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\+home\\index.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\app.routes.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\app.routes.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\+about\about.module.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\+about\\about.module.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\shared\shared.module.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\shared\\shared.module.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\+home\home.module.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\+home\\home.module.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\node_modules\angular2-busy\index.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["node_modules\\angular2-busy\\index.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\app.module.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\app.module.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\hot_loader_main.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\hot_loader_main.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\app\main.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\app\\main.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\testing\router\mock-location-strategy.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\testing\\router\\mock-location-strategy.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\testing\router\router-testing-providers.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\testing\\router\\router-testing-providers.ts"]
Could not find input file C:\Data\_git\irt-web\test\angular2-seed\src\client\src\client\________________empty.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information:
sourceRoot = "C:/Data/_git/irt-web/test/angular2-seed/src/client/"
sources = ["src\\client\\________________empty.ts"]
[13:33:29] Finished 'build.js.dev' after 80 ms

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):

Could not find input file /app/________________empty.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "/app/"
sources = ["________________empty.ts"]

Additionally, on my prod server only, it seems that it’s trying to transpile files that I have excluded (see my tsconfig.json above):

/app/front-end/node_modules/@angular/common/src/directives/ng_class.d.ts(72,35): error TS2304: Cannot find name 'Set'.
/app/front-end/node_modules/@angular/common/src/facade/async.d.ts(27,33): error TS2304: Cannot find name 'Promise'.
/app/front-end/node_modules/@angular/common/src/facade/async.d.ts(28,45): error TS2304: Cannot find name 'Promise'.
/app/front-end/node_modules/@angular/common/src/facade/lang.d.ts(4,17): error TS2304: Cannot find name 'Map'.
/app/front-end/node_modules/@angular/common/src/facade/lang.d.ts(5,17): error TS2304: Cannot find name 'Set'.
/app/front-end/node_modules/@angular/common/src/facade/lang.d.ts(70,59): error TS2304: Cannot find name 'Map'.
...

Note that my tsconfig.json is located at /app on my prod server.