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

Fails with "Error: spawn ENOENT" when node.js is installed under a path that contains spaces #71

Closed
fresheneesz opened this issue Sep 5, 2014 · 1 comment

Comments

@fresheneesz
Copy link

Running the example:

 var forever = require('forever-monitor');

  var child = new (forever.Monitor)('testscript.js', { // yes i created this file
    max: 3,
    silent: true,
    options: []
  });

  child.on('exit', function () {
    console.log('your-filename.js has exited after 3 restarts');
  });
 child.on('error', function(e) {
     console.log("wtf: ",e)
 })

  child.start();
node foreverMonitorTest.js

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

I'm on windows 8 64 bit, node v0.10.29 .

My node.js installation is at "C:\Program Files\nodejs\node.exe". Line 246 of monitor.js (return spawn(command, args, this.spawnWith);) has the command "C:\Program".

@indexzero
Copy link
Member

Fixed by #70. Will be published as forever-monitor@1.4.0

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