TypeError while gulp typescript
Asked Answered
L

1

6

I am getting the following error when I execute my Typescript transpilation:

TypeError: file.isSymbolic is not a function
    at DestroyableTransform.normalize [as _transform] (D:\project\node_modules\vinyl-fs\lib\dest\prepare.js:31:15)
    at DestroyableTransform.Transform._read (D:\project\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_transform.js:182:10)
    at DestroyableTransform.Transform._write (D:\project\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_transform.js:170:83)
    at doWrite (D:\project\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_writable.js:406:64)
    at writeOrBuffer (D:\project\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_writable.js:395:5)
    at DestroyableTransform.Writable.write (D:\project\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_writable.js:322:11)
    at Pumpify.Duplexify._write (D:\project\node_modules\pumpify\node_modules\duplexify\index.js:201:22)
    at doWrite (D:\project\node_modules\pumpify\node_modules\readable-stream\lib\_stream_writable.js:406:64)
    at writeOrBuffer (D:\project\node_modules\pumpify\node_modules\readable-stream\lib\_stream_writable.js:395:5)
    at Pumpify.Writable.write (D:\project\node_modules\pumpify\node_modules\readable-stream\lib\_stream_writable.js:322:11)

My gulp task looks like this:

gulp.task('tsc', function () {
    let tsResult =  gulp.src(srcPaths.tsFiles)
        .pipe(tsProject()); // tsProject created previously

    return tsResult.js
       .pipe(gulp.dest(buildPath)); // -> the gulp.dest(..) command causes the error
});

package.json devDependencies (only gulp and ts-relevant dependencies) looks like this:

{
  "devDependencies": {
    "gulp": "github:gulpjs/gulp#4.0",
    "gulp-sourcemaps": "^2.6.1",
    "gulp-tslint": "^8.1.2",
    "gulp-typescript": "^3.2.3",
    "tslint": "^5.8.0",
    "typescript": "^2.5.0",
  }
}

Node version: 8.9.3 & npm version: 5.6.0

Anyone has an idea what to do?

Librettist answered 22/12, 2017 at 12:7 Comment(1)
We're facing the same issue on our CI since a few hours. It was working fine yesterday. Our code works on an old node_modules copy, but if I clean it, it fails. The only other thread I can find on the subject is on a chinese node forum. This post is 5 hours old. I'm guessing and update on a dependency is messing things up somewhere but I haven't found it yet.Eba
L
5

From the gulp repo (issue):

phated commented 5 hours ago

Your plugins need to be updated to use a newer vinyl. The one they are using to create file objects is really old.

One more solution from the same issue (it works for me):

dozer75 commented 4 hours ago • edited

... You can reference the previous commit id instead of the branch name after the #. The last one is 6d71a65

Leavings answered 22/12, 2017 at 13:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.