在sails中debugging时收听EADDRINUSE错误

我正在尝试使用节点检查器debugging我的代码,但我终于在terminal窗口中一次又一次出现此错误

$ sudo sails debug info: Running app in debug mode... info: You probably want to install / run node-inspector to help with debugging! info: https://github.com/node-inspector/node-inspector info: ( to exit, type <CTRL>+<C> ) Error: listen EADDRINUSE at exports._errnoException (util.js:746:11) at Agent.Server._listen2 (net.js:1156:14) at listen (net.js:1182:10) at Agent.Server.listen (net.js:1267:5) at Object.start (_debugger_agent.js:20:9) at startup (node.js:86:9) at node.js:814:3 

解决

错误:听EADDRINUSE

我试过closures其他terminal窗口(我的节点检查器正在运行)。 我已经在StackOverflow已经提到的答案,但他们没有工作,我甚至尝试给这个命令杀死进程:

 $ killall -9 node No matching processes belonging to you were found 

但仍然不工作。 有人请帮我解决这个问题。

我看到你正在使用sudo所以这不是一个权限问题。

这看起来好像港口已经在使用。 你应该检查哪个进程正在使用该端口 ,然后杀死该进程。

在v12.0上使用sails debug有一个已知的问题 。 有一个补丁 ,将与下一个版本的Sails(v0.12)一起发布。

在此期间,您可以从Github安装Sails的边缘版本,或者通过用https://raw.githubusercontent.com/balderdashy的内容replaceSails&#x7684;/lib/hooks/grunt/index.js文件来自行应用修补程序/sails/88ffc0ed9949f8c74ea390efb5610b0e378fa02c/lib/hooks/grunt/index.js 。