2017-09-07 13 views
0

起動時のNode.jsの典型的な問題です。エラーは次のとおりです。重複したポートやポート番号を変更していないのに、5858ポートを使用できないのはなぜですか?

> [email protected] dev d:\Proj\WxApp\dev\demo 
> egg-bin dev "--debug" 
Debugger listening on [::]:5858 
2017-09-07 15:31:37,739 INFO 7800 [master] egg version 1.7.0 
Error: listen EADDRINUSE :::5858 
    at Object.exports._errnoException (util.js:1018:11) 
    at exports._exceptionWithHostPort (util.js:1041:20) 
    at Agent.Server._listen2 (net.js:1258:14) 
    at listen (net.js:1294:10) 
    at net.js:1404:9 
    at _combinedTickCallback (internal/process/next_tick.js:83:11) 
    at process._tickCallback (internal/process/next_tick.js:104:9) 

最初は重複した呼び出しポートの問題だと思っていました。だから、私は "netstat -aon | findstr '5858'"のようなものを使って、デバッグを行うためにVSコードを開始しました。しかし私は何もそこに残っていないのを見た。この問題はちょうど私がVSコードを起動してデバッグを行うときに起こります。たとえ私が "5858"を変更しても問題は残っています!

ここに私のlaunch.configです:VSCは、デバッグを開始すると

{ 
    // Use IntelliSense to learn about possible Node.js debug attributes. 
    // Hover to view descriptions of existing attributes. 
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 
    "version": "0.2.0", 
    "configurations": [{ 
      "type": "node", 
      "request": "launch", 
      "name": "Launch Egg", 
      "cwd": "${workspaceRoot}", 
      "runtimeExecutable": "npm", 
      "windows": { 
       "runtimeExecutable": "npm.cmd" 
      }, 
      "runtimeArgs": [ 
       "run", 
       "dev", 
       "--", 
       "--debug" 
      ], 
      "protocol": "legacy", 
      "port": 5858 
     }, 
     { 
      "type": "node", 
      "request": "attach", 
      "name": "Attach Agent", 
      "port": 5856 
     }, 
     { 
      "type": "node", 
      "request": "attach", 
      "name": "Attach Worker", 
      "restart": true, 
      "port": 10086 
     }, 
     { 
      "type": "node", 
      "request": "launch", 
      "name": "Start Program", 
      "program": "${workspaceRoot}\\index.js" 
     } 
    ], 
    "compounds": [{ 
     "name": "Debug", 
     "configurations": ["Launch Egg", "Attach Agent", "Attach Worker"] 
    }] 
} 

これは....画像です:

enter image description here

答えて

関連する問題