-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Labels
Description
Even after paring our gulpfile down to the small example you see below, I'm getting numerous re-compiles of the same Typescript files. If you see the console output below, main.tsx's test error is reported 11 times in total!
This has been happening since the first time I tried tsify. I have no tsconfig.json and can't think of any other files that might interfere with the build. RHEL 6.6, Node v5.9.0
gulpfile.js
var gulp = require('gulp');
var browserify = require('browserify');
var tsify = require('tsify');
var source = require('vinyl-source-stream');
var b = browserify({
entries: ['./app/main.tsx']
});
var es6Types = 'node_modules/typescript/lib/lib.es6.d.ts';
var thirdPartyTypes = 'typings/index.d.ts';
b.add(es6Types);
b.add(thirdPartyTypes);
b.plugin(tsify, {
jsx: "react",
target: "ES5",
module: "commonjs"
});
gulp.task('default', function () {
return b.bundle()
.on('error', function(e) { console.error(e.message ? e.message : e) })
.pipe(source('main.js'))
.pipe(gulp.dest('./dest'));
});running gulp
[22:09:38] Using gulpfile /web/pane/example/gulpfile.js
[22:09:38] Starting 'default'...
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
/web/pane/example/app/TitleBar.tsx(109,2): Error TS2354: No best common type exists among return expressions.
/web/pane/example/app/TitleBar.tsx(125,2): Error TS2354: No best common type exists among return expressions.
app/UIPane.tsx(162,2): Error TS2354: No best common type exists among return expressions.
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
/web/pane/example/app/TitleBar.tsx(109,2): Error TS2354: No best common type exists among return expressions.
/web/pane/example/app/TitleBar.tsx(125,2): Error TS2354: No best common type exists among return expressions.
app/IOPane.tsx(53,2): Error TS2354: No best common type exists among return expressions.
app/IOPane.tsx(129,2): Error TS2354: No best common type exists among return expressions.
app/UIPane.tsx(162,2): Error TS2354: No best common type exists among return expressions.
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
/web/pane/example/app/TitleBar.tsx(109,2): Error TS2354: No best common type exists among return expressions.
/web/pane/example/app/TitleBar.tsx(125,2): Error TS2354: No best common type exists among return expressions.
app/IOPane.tsx(53,2): Error TS2354: No best common type exists among return expressions.
app/IOPane.tsx(129,2): Error TS2354: No best common type exists among return expressions.
app/UIPane.tsx(162,2): Error TS2354: No best common type exists among return expressions.
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
/web/pane/example/app/TitleBar.tsx(109,2): Error TS2354: No best common type exists among return expressions.
/web/pane/example/app/TitleBar.tsx(125,2): Error TS2354: No best common type exists among return expressions.
app/IOPane.tsx(53,2): Error TS2354: No best common type exists among return expressions.
app/IOPane.tsx(129,2): Error TS2354: No best common type exists among return expressions.
app/UIPane.tsx(162,2): Error TS2354: No best common type exists among return expressions.
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
/web/pane/example/app/TitleBar.tsx(109,2): Error TS2354: No best common type exists among return expressions.
/web/pane/example/app/TitleBar.tsx(125,2): Error TS2354: No best common type exists among return expressions.
app/IOPane.tsx(53,2): Error TS2354: No best common type exists among return expressions.
app/IOPane.tsx(129,2): Error TS2354: No best common type exists among return expressions.
app/UIPane.tsx(162,2): Error TS2354: No best common type exists among return expressions.
app/main.tsx(7,5): Error TS2322: Type 'number' is not assignable to type 'string'.
[22:10:12] Finished 'default' after 34 s