Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

So this just happened #241

Closed
boop5 opened this issue Dec 2, 2015 · 17 comments
Closed

So this just happened #241

boop5 opened this issue Dec 2, 2015 · 17 comments
Labels

Comments

@boop5
Copy link

boop5 commented Dec 2, 2015

Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\DatabaseConfiguration.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/db/DatabaseConfiguration.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\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:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/db/index.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\enum\CardTier.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/enum/CardTier.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\enum\CardType.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/enum/CardType.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\enum\PatchType.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/enum/PatchType.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\enum\Champion.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/enum/Champion.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\enum\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:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/enum/index.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\IDatabaseObject.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/db/IDatabaseObject.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\Types.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/db/Types.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\plugins\timestamp.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/db/plugins/timestamp.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\plugins\versionkey.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/db/plugins/versionkey.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\plugins\toJSON.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/db/plugins/toJSON.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\plugins\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:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/db/plugins/index.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\model\Card.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/model/Card.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\model\Champion.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/model/Champion.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\model\Deck.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/model/Deck.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\model\Patch.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/model/Patch.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\model\User.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/model/User.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\model\Article.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/model/Article.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\model\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:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/model/index.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\log.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/log.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\TemplateEngine.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/TemplateEngine.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\routes\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:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/routes/index.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\auth.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["auth.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\zzzPassport.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/zzzPassport.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\app.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/app.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\utils\walk.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/utils/walk.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\utils\capitalize.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/utils/capitalize.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\utils\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:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/utils/index.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\DataLoader.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["backend/DataLoader.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\bin\www.ts. This is probably an issue of gulp-typescript.
Please report it at https://github.com/ivogabe/gulp-typescript/issues
Debug information: 
sourceRoot = "c:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["bin/www.ts"]
Could not find input file c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\bin\________________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:/Users/XXX/Documents/Dev/private/ZZZ/src/bin/"
sources = ["bin/________________empty.ts"]
@pablodenadai
Copy link

Can you confirm that the files actually exist? Eg. c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\DatabaseConfiguration.ts

@ivogabe
Copy link
Owner

ivogabe commented Dec 2, 2015

Can you create a minimal example that reproduces this? (gulpfile, directory structure, tsconfig)

@boop5
Copy link
Author

boop5 commented Dec 2, 2015

Not much time atm, I'll try to.

c:\Users\XXX\Documents\Dev\private\ZZZ\src\bin\backend\db\DatabaseConfiguration.ts

exists

###tsconfig.json

{
  "compilerOptions": {
    "module": "commonjs",
    "noImplicitAny": true,
    "removeComments": true,
    "preserveConstEnums": true,
    "sourceMap": true,
    "target": "ES5"
  },
  "exclude": [
    "node_modules",
    "typings"
  ]
}

Folder structure (simplified, in case there is a folder in the initial log
message which is not here)

.
├── logs
└── src
├── backend
├── bin
├── frontend
├── node_modules
└── gulpfile.js

###gulpfile

gulp.task('tsc'; tasks.tsc);
var tasks = { tsc: function (done, file) {
    if (file) {
        gutil.log('Compile typescript', gutil.colors.magenta(file.path));
        return gulp
            .src(file.path)
            .pipe(sourcemaps.init())
            .pipe(tsc(tscProject)).js
            .on('error', done)
            .pipe(sourcemaps.write('.'))
            .pipe(gulp.dest(path.dirname(file.path)))
            .on('end', function () {
                gutil.log(gutil.colors.green('Done compiling Typescript',
file.path));
            });
    }
}
}



    watch: function () {
        var done = function (err) {
            gutil.log(gutil.colors.red('WOOPSIE', err));
        };
        gulp.watch([
            './*.ts',
            './bin/*.ts',
            './backend/**/*.ts',
            './shared/**/*.ts',
            '!./backend/typings/**/*'
        ]).on('change', function (file) {
            tasks.tsc(done, file);
        });
    }

I hope I haven't missed anything here

@boop5
Copy link
Author

boop5 commented Dec 2, 2015

Oh I can say that this just happens when i change ./src/bin/www.ts

@ivogabe
Copy link
Owner

ivogabe commented Dec 2, 2015

Is it only happening with incremental compilation (watch)?

@boop5
Copy link
Author

boop5 commented Dec 2, 2015

Oh wow, I just forgot to mention that! My bad, sorry!
Yes, it only happens with watch.

On Wed, Dec 2, 2015 at 6:16 PM, Ivo Gabe de Wolff notifications@github.com
wrote:

Is it only happening with incremental compilation (watch)?


Reply to this email directly or view it on GitHub
#241 (comment)
.

@ivogabe
Copy link
Owner

ivogabe commented Dec 2, 2015

It looks like you've implemented your own incremental compilation. A project object cannot be used concurrently, and I think the task gets triggered for two different files, at almost the same time. Could that be the case?

I wouldn't advise to use such system, as it will leed to unexpected behavior, and you will not get all type errors. You can use 'isolatedModules` instead, to speed up compilation.

@boop5
Copy link
Author

boop5 commented Dec 2, 2015

It looks like you've implemented your own incremental compilation

well its just gulp.watch().on('change') - to avoid compiling the whole
project on each removed whitespace :D

I think the task gets triggered for two different files

Hmm actually not. I'll check this tho.

On Wed, Dec 2, 2015 at 7:12 PM, Ivo Gabe de Wolff notifications@github.com
wrote:

It looks like you've implemented your own incremental compilation. A
project object cannot be used concurrently, and I think the task gets
triggered for two different files, at almost the same time. Could that be
the case?

I wouldn't advise to use such system, as it will leed to unexpected
behavior, and you will not get all type errors. You can use
'isolatedModules` instead, to speed up compilation.


Reply to this email directly or view it on GitHub
#241 (comment)
.

@boop5
Copy link
Author

boop5 commented Dec 3, 2015

c:\Users\XXX\Documents\Dev\private\ZZZ\src\backend\db\DatabaseConfiguration.ts

exists

gulp is looking for

c:\Users\XXX\Documents\Dev\private\ZZZ\src\    bin    \backend\db\DatabaseConfiguration.ts

tho

www.ts

import DatabaseConfiguration = require('../backend/db/DatabaseConfiguration');

DatabaseConfiguration.ts

export = ... // not important

@ivogabe
Copy link
Owner

ivogabe commented Mar 24, 2016

What happens when you use the latest version? Do you get a warning which says that a Project is reused in two compilations at the same time?

@drallgood
Copy link

Nope. Just doesn't compile correctly.
I think this is happening because gulp does some magic with the base_dir when calling the tasks you defined in watch.
Just a guess, though.

@ivogabe
Copy link
Owner

ivogabe commented Mar 28, 2016

@drallgood I did a quick check, and gulp-typescript handles that correctly (when the same project is used on multiple compilations, not at the same time, but with different directories). Can you post your gulpfile? And just to make sure, you're using the latest version of gulp-typescript and you see the error "Could not find input file"?

@drallgood
Copy link

@ivogabe
Sure.
The gulpfile is split into multiple files, but here are the key elements:

//TypeScript compile
gulp.task('build-ts',['tsconfig-glob'], function () {
  return gulp
    .src(tsConfig.files)
    .pipe(cache('typescript'))
    .pipe(sourcemaps.init())
    .pipe(tslint())
    .pipe(tslint.report('prose', {emitError: false}))
    .pipe(typescript(tsConfig.compilerOptions))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest(paths.outputs.root))
    .pipe(browserSync.stream());
});

// outputs changes to files to the console
function reportChange(event){
  console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
}

gulp.task('watch', ['serve'], function() {
  gulp.watch(paths.sources.ts, ['build-ts', browserSync.reload]).on('change', reportChange);
 });

Yes, I'm using the latest version. And no, I don't see the "Could not find input file" error. I get a bunch of "Cannot find name" errors

@ivogabe
Copy link
Owner

ivogabe commented Mar 28, 2016

@drallgood "Cannot find name" errors are not related to this issue, but probably related to a bad config. When you use a cache, not all files are passed to TypeScript, thus the compiler cannot find variables exported from these files. When you remove the cache, you wouldn't get these issues (probably).

@drallgood
Copy link

@ivogabe Indeed you were right. Sorry about that. I encountered the above error, but somehow solved it... No idea what i did, though.

@ivogabe
Copy link
Owner

ivogabe commented Apr 10, 2016

@babbelnedd Is this still an issue with the latest version?

@ivogabe
Copy link
Owner

ivogabe commented Sep 23, 2016

This should not be an issue any more with version 3.

@ivogabe ivogabe closed this as completed Sep 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants