Write/use a version of spawn that tells you what it tried to spawn in the error message #3908

Closed
domenic opened this Issue Sep 19, 2013 · 12 comments

Comments

Projects
None yet
7 participants
Member

domenic commented Sep 19, 2013

It is horrible for users to get error messages telling them "spawn ENOENT" with no idea what npm was trying to spawn.

Member

robertkowalski commented Feb 5, 2014

Because I was quite unhappy with messing around with the events I talked to some of the node core people, they seem to like the feature.

So if anyone knows C++ better than me, please see joyent/node#6659 - it would be a huge help for providing support for npm in the daily work. And alot of other projects would benefit, too.

Member

robertkowalski commented Sep 5, 2014

Good news @domenic - this feature landed in May in Node.js and is still not released (it is merged to master)

PR:
joyent/node#7520

Commit:
nodejs/node-v0.x-archive@f09b027

Member

domenic commented Sep 5, 2014

Yayyyy!! Except for the fact that Node 0.12 will probably be released only after the stars have burnt out their nuclear fuel and spent themselves into mere cosmic ashes. Boooo about that.

👍

What an ill-timed thumbs up! I missed @domenic's totally cheerful comment by milliseconds, lol. On that timeline, I guess we can look forward to the last particles decaying and heat death of the universe before Node 1.0...

ryancole commented Sep 5, 2014

cool 👍

@othiym23 othiym23 added error-messages and removed easy labels Sep 5, 2014

Contributor

othiym23 commented Sep 5, 2014

It's entirely possible to fix this from the npm side of things, which is why the error-messages tag exists. It would be sweet to have node-level support for this, but yeah, entropy, heat-death of the universe, etc, and if 0.8's long tail is any indication, 0.10 is going to be with us for a while as well, even if 0.12 were to drop tomorrow.

@othiym23 othiym23 removed the nice to have label Oct 7, 2014

Contributor

smikes commented Nov 4, 2014

See PR #6634 for a candidate fix.

@othiym23 othiym23 closed this in e007a2c Nov 7, 2014

Contributor

othiym23 commented Nov 7, 2014

Landed in e007a2c. May need a few further tweaks, as I'm not sure @smikes's solution catches all of the spawn failures, but it's a big step forward. Thanks!

Hi. There is a problem with this fix, namely
lines 11-12:
" var raw = _spawn(cmd, args, options)
cooked = new EventEmitter()"

Here is a missing comma. So "cooked" is global, which (at least in our build) leads to an npm crash without any messages. I could trace it down to this missing comma. This happens, whenever spawn is called again, before the first one could finish.

I hope this can be fixed soon.
Thanks.

Contributor

smikes commented Nov 20, 2014

thanks!

On Thu, Nov 20, 2014 at 9:11 AM, ReddogStone notifications@github.com
wrote:

Hi. There is a problem with this fix, namely
lines 11-12:
" var raw = _spawn(cmd, args, options)
cooked = new EventEmitter()"

Here is a missing comma. So "cooked" is global, which (at least in our
build) leads to an npm crash without any messages. I could trace it down to
this missing comma. This happens, whenever spawn is called again, before
the first one could finish.

I hope this can be fixed soon.
Thanks.


Reply to this email directly or view it on GitHub
#3908 (comment).

Contributor

smikes commented Nov 20, 2014

Thanks for the timely and specific bug report! There is a candidate fix (#6752).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment