Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: listen EADDRINUSE: address already in use 0.0.0.0:8080 #4737

Closed
hoboy0313 opened this issue Oct 22, 2019 · 1 comment
Closed

Error: listen EADDRINUSE: address already in use 0.0.0.0:8080 #4737

hoboy0313 opened this issue Oct 22, 2019 · 1 comment

Comments

@hoboy0313
Copy link

Version

4.0.4

Reproduction link

https://github.com/hotpotLeo/mobile-vue-wrapper

Environment info

Error: listen EADDRINUSE: address already in use 0.0.0.0:8080
    at Server.setupListenHandle [as _listen2] (net.js:1279:14)
    at listenInCluster (net.js:1327:12)
    at doListen (net.js:1460:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Emitted 'error' event at:
    at emitErrorNT (net.js:1306:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    [... lines matching original stack trace ...]
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
error Command failed with exit code 1. 

Steps to reproduce

  1. git clone
  2. yarn
  3. yarn dev

What is expected?

I'm no use the port before i run the program, even I change the port with 8888, it's still happen.

What is actually happening?

The error should not be happen

@haoqunjiang
Copy link
Member

haoqunjiang commented Oct 22, 2019

yarn serve | npm run serve

You used the pipe operator |, which will first run yarn serve and then pass the output of this command as stdin to the second command npm run serve. That means you are running two servers simultaneously, of course there will be an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants