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

Unhandled error event on gull-shell ≥ 0.6.0 #86

Closed
wjdp opened this issue Mar 6, 2017 · 10 comments
Closed

Unhandled error event on gull-shell ≥ 0.6.0 #86

wjdp opened this issue Mar 6, 2017 · 10 comments

Comments

@wjdp
Copy link

wjdp commented Mar 6, 2017

Doing a package upgrade on a project I maintain. Seeing the following with ≥ 0.6.0:

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn echo Hello World ENOENT
    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickCallback (node.js:355:17)
    at Function.Module.runMain (module.js:444:11)
    at startup (node.js:136:18)
    at node.js:966:3

Gulpfile to reproduce:

'use strict';

var gulp = require('gulp');
var shell = require('gulp-shell');

var SHELL_OPTS = { verbose: true };

gulp.task('hello', shell.task(['echo Hello World'], SHELL_OPTS))

Environment, package versions here: https://github.com/newtheatre/history-project/blob/91ccd325b98066e94c28f65b6cb56ea517a0e3f5/package.json

Same Gulpfile works under 0.5.2:

[19:23:16] Using gulpfile ~/local/history-project/gulpfile.js
[19:23:16] Starting 'hello'...
[19:23:16] echo Hello World
Hello World
[19:23:16] Finished 'hello' after 22 ms
wjdp added a commit to newtheatre/history-project that referenced this issue Mar 6, 2017
Build is failing, cannot execute commands.

Reported upstream: sun-zheng-an/gulp-shell#86
@sun-zheng-an
Copy link
Owner

Which Node.js version do you use?

@wjdp
Copy link
Author

wjdp commented Mar 6, 2017

Node is v4.2.6, guessing that's quite old (using the Ubuntu repos)

@wjdp
Copy link
Author

wjdp commented Mar 6, 2017

Tried on v6.10.0, works

@sun-zheng-an
Copy link
Owner

sun-zheng-an commented Mar 6, 2017

Oh, I found that I had used a feature added from Node 4.8.0, 5.7.0 and 6.0.0 nodejs/node@c3bb4b1, which is the key change of gulp-shell 0.6.0.

Thanks for the feedback!

I will update the version requirement for it.

@wjdp
Copy link
Author

wjdp commented Mar 6, 2017

Fab, thanks for the quick responses!

@expobrain
Copy link

Actually is failing on Node 5.4.1 as well

@sun-zheng-an
Copy link
Owner

@expobrain

Thanks for your feedback!

I have forgotten to require Node > 5.7.0 for 5.x.

You need to upgrade your Node to fix this, sorry for the inconvenience.

@expobrain
Copy link

Yep, 5.7.0 is the minimum supported version for gulp-shell >= 0.6

@grofit
Copy link

grofit commented May 5, 2017

I just ran into this issue on our CI server as it was baffling why it worked locally, is there any way to check the node version and just throw an error saying the node version is too old or something?

@expobrain
Copy link

Just made a PR to stop the installation of this package if the node's version doesn't match

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

4 participants