user2116647
user2116647

Reputation: 459

Node script throws uv_signal_start EINVAL

I'm running Ubuntu 12.10 and getting started with Node.

I first installed node using the Ubuntu repositories. I ran into some trouble with something, so I re-installed using Chris Lea's repository. After that, node was running better, without that previous error.

Then I ran sudo npm install node-dev -g

But running node-dev script.js wasn't working.

Error:
node.js:762
          throw errnoException(process._errno, 'uv_signal_start');
                ^
Error: uv_signal_start EINVAL
    at errnoException (node.js:540:13)
    at process.on.process.addListener (node.js:762:17)
    at spawn.cwd (/usr/local/lib/node_modules/node-dev/node-dev:52:11)
    at Array.forEach (native)
    at Object.<anonymous> (/usr/local/lib/node_modules/node-dev/node-dev:51:25)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

Upvotes: 35

Views: 14431

Answers (1)

SomeKittens
SomeKittens

Reputation: 39532

The error isn't with node-dev, but rather in your script. Error: uv_signal_start EINVAL is thrown in newer versions of node when you're trying to work with SIGKILL or SIGSTOP, like so:

process.on('SIGKILL', function() { // etc, etc

You probably got away with this in earlier versions, but newer versions will now throw this error (see this GitHub issue for details).

Upvotes: 87

Related Questions