-
Notifications
You must be signed in to change notification settings - Fork 130
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
Cannot read property 'length' of undefined on 3.1.6 #499
Comments
Which version of TypeScript are you using? |
2.1.1 |
@vladima Any idea why the export interface WriteFileCallback {
(fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: SourceFile[]): void;
} Is there some way to force it being set? |
same problem here |
Solved after I reinstalled typesript package |
Is this still an issue to someone? |
Seems solved with typescript 2.1.5 |
@ivogabe Got the same error Current config
var gulp = require("gulp");
var del = require("del");
var ts = require("gulp-typescript");
var tsProject = ts.createProject("tsconfig.json", {
typescript: require("typescript"),
});
gulp.task("clean_tmp", function() {
return del("tmp/**", { force: true });
});
gulp.task("build", function() {
return tsProject
.src()
.pipe(tsProject())
.js.pipe(gulp.dest("tmp"));
});
gulp.task("clean_dist", function() {
return del("dist/**", { force: true });
});
gulp.task("move_dist", function() {
return gulp.src("tmp/**").pipe(gulp.dest("dist"));
});
gulp.task("assets_copy", function() {
return gulp
.src([
"src/ofm-auto.testing.json",
"src/serviceAccountKey.json",
"src/firebase-service-account.json",
])
.pipe(gulp.dest("dist"));
});
gulp.task("views_copy", function() {
return gulp.src(["src/views/**/*"]).pipe(gulp.dest("dist/views"));
});
gulp.task(
"default",
gulp.series(
"clean_tmp",
"build",
"clean_dist",
"move_dist",
"assets_copy",
"views_copy",
"clean_tmp",
),
); tsconfig.json {
"compilerOptions": {
"incremental": true,
"module": "commonjs",
"esModuleInterop": true,
"target": "es2018",
"noImplicitAny": false,
"removeComments": true,
"resolveJsonModule": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist/",
"pretty": true,
"baseUrl": ".",
"alwaysStrict": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"traceResolution": false,
"paths": {
"*": ["node_modules/*", "*"]
},
"types": ["jest", "node"]
},
"include": ["src/**/*.ts"],
"exclude": [".git", "node_modules"]
} |
it seems the incremental prop is the culprit here. this worked for me : |
3.6 is incompatible with gulp-typescript. See ivogabe/gulp-typescript#499.
When running
gulp default
I get an exception when using gulp-typescript 3.1.6:Everything works fine when changing gulp-typescript to version 3.1.5.
Gulp file:
tsconfig.json:
The text was updated successfully, but these errors were encountered: