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

The error message of port in use is not correct. Please check whether it is hard-coded. #424

Closed
hw712 opened this issue May 12, 2018 · 3 comments · Fixed by #425
Closed

Comments

@hw712
Copy link
Contributor

hw712 commented May 12, 2018

In my laptop, port 8080 is in use, port 8081 is free.

When I start vuepress dev command without any further configuration, it said port 8081 is in use. I think it should be 8080, and perhaps this error message is hard-coded. Please check it.

D:\JavaScript\DemoVuePress>vuepress dev
Extracting site metadata...
Compiling

* Client █████████████████████████ compiling (0%)


× 「serve」:  { Error: listen EADDRINUSE 127.0.0.1:8081
    at Object._errnoException (util.js:1024:11)
    at _exceptionWithHostPort (util.js:1046:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1501:7)

  VuePress dev server listening at http://localhost:8081/

According to the vuepress documents, the default port is 8080, which is not free in my laptop, so I changed the default port to anther free port, everything is okay.

Working Environment

  • Windows 7
  • Node.JS 8.9.3
  • VuePress 0.8.4
@meteorlxy
Copy link
Member

meteorlxy commented May 12, 2018

Reproduced on Windows 10.

It's not hard-coded in Vuepress for sure.

Maybe related to the portfinder or webpack-serve

---update
Cannot reproduce on Ubuntu 18.04

@meteorlxy
Copy link
Member

It could be an issue of webpack-serve on Windows.

The simplest way to repro:

vuepress dev --port=8081

As 8081 is hard-coded in webpack-server (Code link)

@ulivz
Copy link
Member

ulivz commented May 12, 2018

It's indeed a bug of webpack-serve and still unresolved. see: webpack-contrib/webpack-serve#37 (comment).

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

Successfully merging a pull request may close this issue.

3 participants