我正在尝试调出我的NodeJS应用程序,该应用程序在不同的Windows机器上运行完美,但我在Win 7机箱上收到以下错误:
C:\aaaa\at>c:\nodejs\npm start
> application-name@0.0.1 start C:\aaaa\at
> node ./bin/www
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EACCES
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1023:19)
at listen (net.js:1064:10)
at Server.listen (net.js:1138:5)
at Server.listen.Server.attach (C:\aaaa\at\node_modules\socket.io\lib\in
dex.js:214:9)
at new Server (C:\aaaa\at\node_modules\socket.io\lib\index.js:51:17)
at Server (C:\aaaa\at\node_modules\socket.io\lib\index.js:39:41)
at Object.<anonymous> (C:\aaaa\at\app.js:7:37)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
npm ERR! application-name@0.0.1 start: `node ./bin/www`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the application-name@0.0.1 start script.
npm ERR! This is most likely a problem with the application-name package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get their info via:
npm ERR! npm owner ls application-name
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "c:\\nodejs\\\\node.exe" "c:\\nodejs\\node_modules\\npm\\bin\\n
pm-cli.js" "start"
npm ERR! cwd aaaa\at
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\aaaa\at\npm-debug.log
npm ERR! not ok code 0
根据上述错误:
at Object.<anonymous> (C:\aaaa\at\app.js:7:37)
这是loc:
global.socket = require('socket.io')(80, {'transports': ['polling']});
我不确定如何解决这个问题?
答案 0 :(得分:1)
可能在该端口上运行另一台服务器(可能是Internet Information Server,因为您在Windows上)。尝试停止,或更改节点运行的端口。