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

Nodejs 0.10 events.js exception #30

Closed
0x80 opened this issue Mar 14, 2013 · 5 comments
Closed

Nodejs 0.10 events.js exception #30

0x80 opened this issue Mar 14, 2013 · 5 comments

Comments

@0x80
Copy link

0x80 commented Mar 14, 2013

I'm just trying out docker for the first time, but I keep getting this exception no matter what I try. I just upgraded to node 0.10, maybe it's not compatible?

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:945:11)
at Process.ChildProcess._handle.onexit (child_process.js:736:34)

@jbt
Copy link
Owner

jbt commented Mar 15, 2013

Do you have Pygments installed? That's one possible cause of that error - check out http://pygments.org/download/ if not.

In other news, I am planning to drop the pygments dependency very soon, as soon as I can find the time.

@0x80
Copy link
Author

0x80 commented Mar 15, 2013

Ah it's working now. Maybe you could add a check in your code to detect it and give an informative error message. In a project I'm using this:

function findExecutable(name, callback) {
var exec = require('child_process').exec;
exec("which " + name, function (error, stdout) {
    // strip newline (todo also whitespace?)
    var path = stdout.replace("\n", '');
    if (path === "") {
        callback(new Error("No executable found with name: " + name));
    } else {
        callback(null, path);
    }
});
}

@jbt
Copy link
Owner

jbt commented Mar 15, 2013

Yeah that'd be a good idea. I think I put something in the npm install script, but yeah probably should have something in the actual runner too.

@jbt
Copy link
Owner

jbt commented Mar 17, 2013

I'm going to close this as I've already got #31 open for dropping the pygments dependency ASAP.

Doing a "which pygmentize" probably wouldn't be suitable as a sanity check because it wouldn't work on windows machines. I think for now I'm just going to leave it and hopefully rip out the pygments dependency altogether very soon.

@jbt jbt closed this as completed Mar 17, 2013
@0x80
Copy link
Author

0x80 commented Mar 17, 2013

Hi jbt. I just recently discovered shelljs. This is a portable posix shell interface for node. It has a "which" method that should work on Windows too as I understand it. But it adds a dependency of course...

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