[LINUX] Dealing with "error Looks like develop for this site is already running, can you visit http: // localhost: 8000? If it is not, try again in five seconds!" In Gatsby

Case study

gatsby developWhen I executed, the following was displayed

error Looks like develop for this site is already running, can you visit http://localhost:8000 ? If it is not, try again in five seconds!

http://localhost:8000 Nothing is displayed when I check, and the same error occurs even if I execute it again after 5 seconds.

When you run `` `gats by develop``` several times

Something is already running at port 8000
✔ Would you like to run the app at another port instead? … yes

I thought that it was running on another port because it came out http://localhost:8001 http://localhost:8002 I checked and saw, but nothing is displayed

Solutions

Kill the node process that is using localhost.

 $lsof -i | grep node
node    15390 user   18u  IPv6 182160      0t0  TCP *:50402 (LISTEN)
node    15404 user   20u  IPv6 182176      0t0  TCP *:33269 (LISTEN)
node    18498 user   42u  IPv4 225478      0t0  TCP localhost:8000 (LISTEN)
node    18984 user   42u  IPv4 225478      0t0  TCP localhost:8002 (LISTEN)
node    18938 user   42u  IPv4 225478      0t0  TCP localhost:8001 (LISTEN)
node    18938 user   44u  IPv6 223182      0t0  TCP *:38749 (LISTEN)
node    18951 user   18u  IPv6 223200      0t0  TCP *:50400 (LISTEN)
node    18958 user   25u  IPv4 224178      0t0  TCP localhost:34455 (LISTEN)
node    18965 user   20u  IPv6 223192      0t0  TCP *:42389 (LISTEN)

Kill the process

$kill -9 18498
$kill -9 18984
$kill -9 18938

environment

reference

https://github.com/gatsbyjs/gatsby/discussions/26869

Recommended Posts

Dealing with "error Looks like develop for this site is already running, can you visit http: // localhost: 8000? If it is not, try again in five seconds!" In Gatsby