Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError while gulp typescript

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?

like image 972
SilverJan Avatar asked Dec 22 '17 12:12

SilverJan


1 Answers

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

like image 122
Lukman N. Avatar answered Sep 18 '22 14:09

Lukman N.