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

examples - static on linux = Error: spawn node ENOENT #16

Open
patricksebastien opened this issue Apr 11, 2017 · 6 comments
Open

examples - static on linux = Error: spawn node ENOENT #16

patricksebastien opened this issue Apr 11, 2017 · 6 comments

Comments

@patricksebastien
Copy link

patricksebastien commented Apr 11, 2017

[10:43:12] App ready.
/home/psc/Code/electronify-server/examples/static/src
[10:43:12] Command started. [PID: undefined]
PID: undefined
[10:43:12] Error: spawn node ENOENT
{ Error: spawn node ENOENT
    at exports._errnoException (util.js:1026:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn node',
  path: 'node',
  spawnargs: [ 'server.js' ] }
[10:43:12] Loading failed.
-102 'ERR_CONNECTION_REFUSED' 'http://127.0.0.1:8081/'
[10:43:12] Finished loading.
[10:43:14] All windows closed.
[10:43:14] Window closed.

But running node on the command line works:
node server.js

@Stefdv
Copy link

Stefdv commented Jun 21, 2017

Exactly the same problem on Windows 10.

@eliquious
Copy link
Owner

It seems like the issue is inside the library being used for the spawn command. There's an issue open on that library as well (patrick-steele-idem/child-process-promise#8). I'll look at the solution proposed for that issue and try to work it in.

@mrfenix
Copy link

mrfenix commented Sep 17, 2017

Have you found a solution for this yet?

@mackenrou
Copy link

I think this error occurs because the client is called before server is started.

My temp solution is working...
On index.js:

.progress(function (childProcess) {
  debug('Command started. [PID: ' + childProcess.pid + ']');
  self.emit('child-started', childProcess);

  //wait for log from server...
  childProcess.stdout.on('data', function(buffer) {
    var out = buffer.toString();
    if(out.indexOf('Server lifted') > -1){
      start(cfg, app, childProcess, debug);
    }
  });
  
});

@ozgrozer
Copy link

@mackenrou Your solution didn't work for me. Still spawn node ENOENT error.

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

7 participants
@mrfenix @patricksebastien @ozgrozer @eliquious @Stefdv @mackenrou and others