Port "already in use" after each server restart
Searching for help with peculiar issue. Each time I stop and restart the server, I get this message:
Jim@Jim-PC MINGW64 ~/nodeProjects/express-locallibrary-tutorial
$ npm start
> express-locallibrary-tutorial@0.0.0 start C:UsersJimnodeProjectsexpress-locallibrary-tutorial
> node ./bin/www
Port 3300 is already in use
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! express-locallibrary-tutorial@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the express-locallibrary-tutorial@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersJimAppDataRoamingnpm-cache_logs2017-09-19T17_39_10_578Z-debug.log
I change the port to 3301, it works. I stop and restart the server and receive an error that 3301 is already in use. I change the port to 3302 and it works. Stop and start and get error that 3302 is already in use.
I stopped using nodemon several days ago for the same issue on another application, and it stopped. For this application, I installed nodemon, but not globally, ran into issues and uninstalled it. But the issue persists.
I would appreciate any ideas on a solution if anyone has encountered this.
链接地址: http://www.djcxy.com/p/52722.html上一篇: 如何从node.js正确退出
下一篇: 在每个服务器重新启动后,端口“已被使用”