我正在尝试使用 node-ar-drone 包来控制和连接 AR Parrot Drone 2,但在我的 OSX Yosemite 中连接到无人机的无线网络后出现以下错误:
587214779:examples mona$ node png-stream.js
Connecting png stream ...
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at Server.listen (net.js:1127:5)
at Object.<anonymous> (/Users/mona/iotlab/armyo/node-ar-drone/examples/png-stream.js:28:8)
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)
587214779:examples mona$
我想知道错误可能是什么?
有关更多信息,我已遵循以下教程:
git clone https://github.com/felixge/node-ar-drone.git
使用此命令安装它:
npm install git://github.com/felixge/node-ar-drone.git
P.S.:我实际上是在示例目录中运行一个示例,我没有更改任何代码。
最佳答案
在 png-stream.js 中更改以下行:
server.listen(8080, function() {
console.log('Serving latest png on port 8080 ...');
});
到不同的端口,例如 8081:
server.listen(8081, function() {
console.log('Serving latest png on port 8081 ...');
});
关于javascript - 事件.js :72 throw er;//Unhandled 'error' event,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32594530/