节点脚本抛出 uv

编程入门 行业动态 更新时间:2024-10-27 09:40:30
本文介绍了节点脚本抛出 uv_signal_start EINVAL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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 在您尝试使用 SIGKILLSIGSTOP 时在较新版本的节点中抛出,如下所示:

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:关键词]

本文发布于:2023-04-29 08:02:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1186692.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:节点   抛出   脚本   uv

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!