gatsby serve 出现端口被占用问题,能不能改gatsby serve 的端口号呀

Created on 31 Mar 2019  ·  3Comments  ·  Source: gatsbyjs/gatsby

F:\gatsby-site>gatsby serve
error UNHANDLED EXCEPTION
Error: listen EADDRINUSE 127.0.0.1:9000

question or discussion

Most helpful comment

Like @anastasialanz correctly mentioned, EADDRINUSE is thrown when the port is already in use. This is a great opportunity to auto detect and let the user pick a port like we have for develop so I've gone ahead and added that in.

Thank you for opening this @tgy3300 and for your response @anastasialanz!

All 3 comments

I am also seeing this issue. For me, php-fpm was running on port 9000. I tried gatsby serve -p 8000 to run it on a different port and it worked fine.

Like @anastasialanz correctly mentioned, EADDRINUSE is thrown when the port is already in use. This is a great opportunity to auto detect and let the user pick a port like we have for develop so I've gone ahead and added that in.

Thank you for opening this @tgy3300 and for your response @anastasialanz!

Published in [email protected]

Was this page helpful?
0 / 5 - 0 ratings

Related issues

signalwerk picture signalwerk  ·  3Comments

Oppenheimer1 picture Oppenheimer1  ·  3Comments

andykais picture andykais  ·  3Comments

jimfilippou picture jimfilippou  ·  3Comments

3CordGuy picture 3CordGuy  ·  3Comments