Home
Support Forums

Netlify Dev closes port 8888 but not port 3000 (default create-react-app port)

Every time I try to run netlify dev again it says there’s something running on port 3000.

I have been using the below to kill the task:
netstat -ano | findstr :
taskkill /PID /F

But it does get annoying to have to keep doing that. Anyway it can be done automatically?

Related: is it necessary for it to start the app on port 3000 as well?

Hey there @ShaCP :wave:

How are you initializing Netlify Dev locally? And how are you killing the Netlify Dev process? Netlify Dev should actually start up and run your SSG system within its own process and killing Netlify Dev should kill the SSG system as well.


Jon

I opened an issue on the CLI #2873 a while ago that might have some relevance here.

While the issue was that of an incorrectly typed command, the result was that Netlify CLI did not terminate correctly and the SSG (React in this case) remained running consuming port 3000. I was unaware for some time and receive the same “there’s something running on port 3000” message until I found the React instance and killed it.

I’m using “netlify dev --inspect” from the vscode terminal. I’m killing it with the “kill terminal” button in vscode.

Hi @ShaCP,

You should not “kill terminal” without reason. It will abruptly end any processes and that’s what’s causing this I’d expect. You need to press Ctrl + C (All OS) for Netlify Dev to exit and that would shut down app server too.

It makes no difference. I have also used ctrl + c and the same thing happens. I just tried it.

Do you have a repo that can reproduce this issue? At the moment, I’m not seeing it with of the websites that I’ve with me.