使用npm start 命令是报错 Error: listen EADDRINUSE :::3000

在使用到npm start 进行本地debug的时候,莫名的抛出了异常,一脸懵逼,
 

G:\chenqk\app\HAM-Front>npm start

> [email protected] start G:\chenqk\app\HAM-Front
> node proxy-server.js

[HPM] Proxy created: [ '**',
  '!/han-debug.html',
  '!/am/**',
  '!/ov-component-demo/**',
  '!/locales/**',
  '!/imgs/**' ]  ->  https://172.16.101.222:443
[HPM] Subscribed to http-proxy events:  [ 'error', 'close' ]
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::3000
    at Object.exports._errnoException (util.js:953:11)
    at exports._exceptionWithHostPort (util.js:976:20)
    at Server._listen2 (net.js:1253:14)
    at listen (net.js:1289:10)
    at Server.listen (net.js:1385:5)
    at EventEmitter.listen (G:\chenqk\app\HAM-Front\node_modules\express\lib\application.js:617:24)
    at Object. (G:\chenqk\app\HAM-Front\proxy-server.js:51:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node proxy-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node proxy-server.js'.
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 otherfrontends package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node proxy-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs otherfrontends
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls otherfrontends
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     G:\chenqk\app\HAM-Front\npm-debug.log

 

仔细看了一下,问题出现在Error: listen EADDRINUSE :::3000

然后查看了一下端口号,好家伙,原来是被占用了,然后把占用的进程杀死就行了

使用npm start 命令是报错 Error: listen EADDRINUSE :::3000_第1张图片

重新执行以下npm start指令,发现执行成功

使用npm start 命令是报错 Error: listen EADDRINUSE :::3000_第2张图片

 

你可能感兴趣的:(前端,npm,start,nodejs)