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

exec.reporter causing a TypeError : Object #<File> has no method 'on' on stream.js #17

Closed
pedroreys opened this issue Apr 21, 2014 · 3 comments

Comments

@pedroreys
Copy link

Hi, after I updated gulp-exec to ~2.0.0 and changed my gulp file to use the reporter, an error is being thrown by gulp-exec:

  dest.on('drain', ondrain);
       ^
TypeError: Object #<File> has no method 'on'
    at Transform.Stream.pipe (stream.js:65:8)
    at Transform._transform (C:\dev\foo\node_modules\gulp-exec\index.js:71:8)
    at Transform._read (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:179:10)
    at Transform._write (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:167:12)
    at doWrite (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:223:10)
    at writeOrBuffer (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:213:5)
    at Transform.Writable.write (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_writable.js:180:11)
    at write (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:586:24)
    at flow (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:595:7)
    at Transform.pipeOnReadable (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:627:5)
    at Transform.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:411:10)
    at emitReadable (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:407:5)
    at readableAddChunk (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:168:9)
    at Transform.Readable.push (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:130:10)
    at Transform.push (C:\dev\foo\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:140:32)
    at C:\dev\foo\node_modules\gulp-exec\index.js:36:9
    at ChildProcess.exithandler (child_process.js:635:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

This only happens when I try to use the reporter, if I don't do .pipe(exec.reporter(reportOptions)) everything works, but I don't get the stdout output that I need.

Thanks!

@robrich
Copy link
Owner

robrich commented Apr 21, 2014

Can you include your gulpfile?

@pedroreys
Copy link
Author

Hi @robrich, as I just needed to run an .exe, I followed your advice and just ended up just running the command directly without the plugin.

If you still want to look further into the issue, let me know and I can try to repro it again and provide you the gulpfile. Otherwise, feel free to close this issue.

Thanks for all your work on gulp!

@robrich
Copy link
Owner

robrich commented Apr 28, 2014

Thanks for the bug report. v2.0.1 resolves this concern. You're right to take the approach you did.

@robrich robrich closed this as completed Apr 28, 2014
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