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

Resolved files outside of the gulp base path break the build #112

Closed
jseto opened this issue May 11, 2015 · 5 comments · Fixed by #113
Closed

Resolved files outside of the gulp base path break the build #112

jseto opened this issue May 11, 2015 · 5 comments · Fixed by #113

Comments

@jseto
Copy link

jseto commented May 11, 2015

A weird behavior is seen in ver.2.7.2

this error is found after updating to gulp-typescript v.2.7.2

/home/jseto/programming-projects/web/granada-prototypes/node_modules/gulp-typescript/release/output.js:59
                    file.skipPush = !file.original.gulp;
                                                  ^
TypeError: Cannot read property 'gulp' of undefined
    at Output.addOrMergeFile (/home/jseto/programming-projects/web/granada-prototypes/node_modules/gulp-typescript/release/output.js:59:51)
    at Output.write (/home/jseto/programming-projects/web/granada-prototypes/node_modules/gulp-typescript/release/output.js:35:14)
    at ProjectCompiler.inputDone (/home/jseto/programming-projects/web/granada-prototypes/node_modules/gulp-typescript/release/compiler.js:57:33)
    at CompileStream.end (/home/jseto/programming-projects/web/granada-prototypes/node_modules/gulp-typescript/release/main.js:52:31)
    at DestroyableTransform.onend (/home/jseto/programming-projects/web/granada-prototypes/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:523:10)
    at DestroyableTransform.g (events.js:180:16)
    at DestroyableTransform.emit (events.js:117:20)
    at /home/jseto/programming-projects/web/granada-prototypes/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:965:16
    at process._tickCallback (node.js:448:13)

this happens with this configuration

var tsTest = function(){
    var tsResult = gulp.src([
        path.test.client + '**/*.ts',
    ])
    .pipe( ts({
        target: 'ES5'
    }) );

    return tsResult.js.pipe( gulp.dest( path.test.outputFiles ) );
};

and the files in path.test.client are these https://github.com/jseto/granada-prototypes/tree/master/test

you can reproduce by cloning https://github.com/jseto/granada-prototypes
and running gulp ts:test

@rogierschouten
Copy link
Contributor

I have this too since the upgrade

@rogierschouten
Copy link
Contributor

The problem seems to have been introduced between v2.6.0 and v2.7.0.

@ivogabe
Copy link
Owner

ivogabe commented May 11, 2015

There was an issue with files outside of the common base directory. I've implemented a fix in the common-source-dir branch. Can you test it with that branch?

@rogierschouten
Copy link
Contributor

Don't have time at the moment, I downgraded to 2.6.0 for the moment. I'll let you know if I do.

@ivogabe ivogabe changed the title ver. 2.7.2 broke ver.2.6.0 behavior from version Resolved files outside of the gulp base path break the build May 11, 2015
@jseto
Copy link
Author

jseto commented May 11, 2015

@ivogabe The fix works and have solved my problem. Thanks!!

ivogabe added a commit that referenced this issue May 11, 2015
Calculate common source directory for files outside the common base path. Fixes #112
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

Successfully merging a pull request may close this issue.

3 participants