该应用程序已部署并启用了最近几个月,并通过更多前端更新(例如,角度设计和布局)进行了积极更新,我更新了node.js服务器app.js,此后一直无法运行。要进行加载,此后我已完全恢复到以前的版本,但仍无法正常工作,但在Digital Ocean上,我将pm2用于服务器上运行的应用程序。我不明白为什么它会这样表现。
我也从npm开始,只是看看它们是否是实际错误和后端,这就是我得到的:
Error: listen EADDRINUSE :::3000
at Object.exports._errnoException (util.js:1020:11)
at exports._exceptionWithHostPort (util.js:1043:20)
at Server._listen2 (net.js:1271:14)
at listen (net.js:1307:10)
at Server.listen (net.js:1403:5)
at EventEmitter.listen (/opt/node_modules/express/lib/application.js:618:24)
at Object.<anonymous> (/opt/app.js:76:5)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:160:9)
at bootstrap_node.js:507:3
npm ERR! Linux 4.4.0-116-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.14.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! downeycrm@1.0.0 start: `node app`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the downeycrm@1.0.0 start script 'node app'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the downeycrm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs downeycrm
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls downeycrm
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/npm-debug.log
那是什么意思?
答案 0 :(得分:0)
Error: listen EADDRINUSE :::3000
意味着另一个进程已经在侦听主机上的端口3000,这可能是您的应用程序当前正在运行。
您可以运行netstat -nltp | grep 3000
来查看它实际上是什么进程,然后终止它并重新启动您的应用。