问题描述
限时送ChatGPT账号..我正在运行 Ubuntu 12.10 并开始使用 Node.
I'm running Ubuntu 12.10 and getting started with Node.
我首先使用 Ubuntu 存储库安装了节点.我遇到了一些麻烦,所以我使用 Chris Lea 的存储库重新安装.在那之后,节点运行得更好,没有之前的错误.
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.
然后我运行 sudo npm install node-dev -g
但是运行 node-dev script.js 不起作用.
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)
推荐答案
错误不在于 node-dev
,而在于您的脚本.Error: uv_signal_start EINVAL
在您尝试使用 SIGKILL
或 SIGSTOP
时在较新版本的节点中抛出,如下所示:
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
您可能在早期版本中避开了这个问题,但新版本现在会抛出此错误(有关详细信息,请参阅 此 GitHub 问题).
You probably got away with this in earlier versions, but newer versions will now throw this error (see this GitHub issue for details).
这篇关于节点脚本抛出 uv_signal_start EINVAL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论