• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

#3 에서 에러가 발생합니다...

20.08.14 04:31 작성 조회수 132

0

byeongukan@anbyeong-ug-ui-MacBookPro boiler-plate % yarn start

yarn run v1.22.4

$ node index.js

events.js:292

      throw er; // Unhandled 'error' event

      ^

Error: listen EADDRINUSE: address already in use :::5000

    at Server.setupListenHandle [as _listen2] (net.js:1313:16)

    at listenInCluster (net.js:1361:12)

    at Server.listen (net.js:1447:7)

    at Function.listen (/Users/byeongukan/Documents/boiler-plate/node_modules/express/lib/application.js:618:24)

    at Object.<anonymous> (/Users/byeongukan/Documents/boiler-plate/index.js:23:5)

    at Module._compile (internal/modules/cjs/loader.js:1137:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)

    at Module.load (internal/modules/cjs/loader.js:985:32)

    at Function.Module._load (internal/modules/cjs/loader.js:878:14)

    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)

    at internal/main/run_main_module.js:17:47

Emitted 'error' event on Server instance at:

    at emitErrorNT (net.js:1340:8)

    at processTicksAndRejections (internal/process/task_queues.js:84:21) {

  code: 'EADDRINUSE',

  errno: 'EADDRINUSE',

  syscall: 'listen',

  address: '::',

  port: 5000

}

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

byeongukan@anbyeong-ug-ui-MacBookPro boiler-plate % 

계속 에러가 뜨는데 왜 이런에러가 뜰까요 ㅠㅠ

답변 2

·

답변을 작성해보세요.

0

quddnr005님의 프로필

quddnr005

질문자

2020.08.17

감사합니다 존안님

0

아 이미 5000번 포트에 노드 서버가 작동하고 있기 때문에 다시 5000번 포트를 이용하려고 할 때 나오는 에러입니다. 

netstat -an | grep 5000 이런식으로 해보시면 뭔가 떠있는걸 볼 수 있을겁니다. 

그 뜻은 이미 5000번에 무엇이 돌아가고 있단 걸 보여주는 것 입니다.

그래서 5000번에 이미 떠있는것을 Down 시키기 위해서는 

pkill node 이런식으로 해주시면 5000번에 떠 있는 node 서버를 Down 시켜줄수있습니다 ~ !