[英]NodeJS - On Windows 10, localhost still runs despite quitting out of nodemon
我使用的是nodemon
命令,這是我第一次使用localhost正確提供所有文件。 但是,當我進行任何更改時,或者退出nodemon(ctrl + c)並再次運行nodemon時,都會出現此錯誤:
events.js:182
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::3000
at Object._errnoException (util.js:1019:11)
at _exceptionWithHostPort (util.js:1041:20)
at Server.setupListenHandle [as _listen2] (net.js:1344:14)
at listenInCluster (net.js:1385:12)
at Server.listen (net.js:1469:7)
at Function.listen
(D:\Apps\NodeJs\Test\node_modules\express\
lib\application.js:
618:24)
at Object.<anonymous>
(D:\Apps\NodeJs\Test\app.js:95:5)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
[nodemon] app crashed - waiting for file changes before starting...
我在進程中注意到,即使我殺死了nodemon
進程, Node.js:Server-side Javascript
也正在運行。 當我只運行node app.js
,我沒有任何問題。 我知道該端口已經用於提供文件服務,因此會出現此錯誤,但是我不確定為什么逃出nodemon
不會殺死進程並再次釋放該端口?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.