Npm stop?

Hello, I am working on Ravenous. I have a seemingly simple question. I used ‘npm start’ to open the project in my browser. How do I stop it? If I just close the browser window and git bash, when I try to re-start it in browser, I get error that it is port 3000 is already being used. How can I just stop it from runnin in port 3000? Any help would be much appreciated.

mark

Here is a link to the assignment: https://www.codecademy.com/paths/web-development/tracks/front-end-applications-with-react/modules/react-development-setup-and-ravenous-part-1/projects/create-prj-components

closing git bash should kill the process? You could check what process is using the port:

sudo lsof -i -P -n | grep LISTEN

then grep that process:

ps aux | grep PROCESS_NAME

then kill it:

pkill -f PROCESS_NAME

careful with the -f flag. You could also use kill process_id, maybe better

also, next time use the interrupt signal (ctrl + c) to terminate npm start

Thanks, stetim94! That worked!
I just did not know about control c.

Thanks also for the speed of your response.

Mark

1 Like

This topic was automatically closed 18 hours after the last reply. New replies are no longer allowed.