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

[email protected] breaks gulp scripts with vinyl issue "file.isSymbolic is not a function" #2065

Closed
dozer75 opened this issue Dec 22, 2017 · 3 comments

Comments

@dozer75
Copy link

dozer75 commented Dec 22, 2017

It seems that during this night the alpha.3 package was released of gulp. But when running typescript compiling using this, i get a stacktrace that states TypeError: file.isSymbolic is not a function

The complete stacktrace for this is:


    at DestroyableTransform.normalize [as _transform] (C:\Temp\Project\node_modules\vinyl-fs\lib\dest\prepare.js:31:15)
    at DestroyableTransform.Transform._read (C:\Temp\Project\node_modules\readable-stream\lib\_stream_transform.js:182:10)
    at DestroyableTransform.Transform._write (C:\Temp\Project\node_modules\readable-stream\lib\_stream_transform.js:170:83)
    at doWrite (C:\Temp\Project\node_modules\readable-stream\lib\_stream_writable.js:406:64)
    at writeOrBuffer (C:\Temp\Project\node_modules\readable-stream\lib\_stream_writable.js:395:5)
    at DestroyableTransform.Writable.write (C:\Temp\Project\node_modules\readable-stream\lib\_stream_writable.js:322:11)
    at Pumpify.Duplexify._write (C:\Temp\Project\node_modules\duplexify\index.js:201:22)
    at doWrite (C:\Temp\Project\node_modules\readable-stream\lib\_stream_writable.js:406:64)
    at writeOrBuffer (C:\Temp\Project\node_modules\readable-stream\lib\_stream_writable.js:395:5)
    at Pumpify.Writable.write (C:\Temp\Project\node_modules\readable-stream\lib\_stream_writable.js:322:11)
    at DestroyableTransform.ondata (C:\Temp\Project\node_modules\readable-stream\lib\_stream_readable.js:612:20)
    at emitOne (events.js:96:13)
    at DestroyableTransform.emit (events.js:188:7)
    at addChunk (C:\Temp\Project\node_modules\readable-stream\lib\_stream_readable.js:284:12)
    at readableAddChunk (C:\Temp\Project\node_modules\readable-stream\lib\_stream_readable.js:271:11)
    at DestroyableTransform.Readable.push (C:\Temp\Project\node_modules\readable-stream\lib\_stream_readable.js:238:10)
    at DestroyableTransform.Transform.push (C:\Temp\Project\node_modules\readable-stream\lib\_stream_transform.js:146:32)

I install gulp using npm with the following configuration in package.json:

"gulp": "github:gulpjs/gulp#4.0"

Please post a sample of your gulpfile (preferably reduced to just the bit that's not working)

var gulp = require("gulp");
var typescript = require("gulp-typescript");
var sourcemaps = require("gulp-sourcemaps");


var typescriptCompile = function (file, done) {
    const tsProject = typescript.createProject("tsconfig.json");

    if (file === null) {
        file = srcPaths.typescript + "**/*.ts";
    } else {
        console.log(`Compiling ${ file }`);
    }

    gulp.src(file)
        .pipe(sourcemaps.init())
        .pipe(tsProject())
        .js
        .pipe(sourcemaps.write(".", {
            includeContent: true, mapSources: function (sourcePath) {
                while (sourcePath.startsWith("../")) {
                    sourcePath = sourcePath.replace("../", "");
                }

                return `/${sourcePath}`;
            } }))
        .pipe(gulp.dest(destPaths.app))
        .on("end", done);
};

gulp.task("compile.typescript", function (done) {
    typescriptCompile(null, done);
});

What version of gulp are you using?
Gulp 4.0 alpha 3

What versions of npm and node are you using?
npm version 3.10.10
node version v6.10.2

@phated
Copy link
Member

phated commented Dec 22, 2017

If you are encountering this error, please see the blog post at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

With the release of vinyl-fs 3.0.1, we've added a temporary fix that converts old Vinyl objects to new ones required by vinyl-fs. If you are having this problem, please ensure you have the very latest vinyl-fs dependency.

@gulpjs gulpjs locked as resolved and limited conversation to collaborators Dec 22, 2017
@gulpjs gulpjs deleted a comment from simonua Dec 22, 2017
@gulpjs gulpjs deleted a comment from tknerr Dec 22, 2017
@gulpjs gulpjs deleted a comment from GregorSondermeier-FD Dec 22, 2017
@gulpjs gulpjs deleted a comment from SilverJan Dec 22, 2017
@gulpjs gulpjs deleted a comment from ba55ie Dec 22, 2017
@gulpjs gulpjs deleted a comment from 417673259 Dec 22, 2017
@gulpjs gulpjs deleted a comment from eugenegodun Dec 22, 2017
@gulpjs gulpjs deleted a comment from 417673259 Dec 22, 2017
@gulpjs gulpjs deleted a comment from dozer75 Dec 22, 2017
@gulpjs gulpjs deleted a comment from dmoosocool Dec 22, 2017
@phated
Copy link
Member

phated commented Dec 28, 2017

With the release of vinyl-fs 3.0.1, we've added a temporary fix that converts old Vinyl objects to new ones required by vinyl-fs. If you are having this problem, please ensure you have the very latest vinyl-fs dependency.

@phated
Copy link
Member

phated commented Jan 1, 2018

gulp 4 has been published under the next tag (npm install gulp@next) and it has the temporary workaround for this problem so I'm going to close this.

We're also making a lot of progress on the ecosystem migration thanks to @demurgos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants