Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Build a Simple Dynamic Site with Node.js Creating a Simple Server in Node.js Creating a Simple Server

Martina Carrington
Martina Carrington
15,754 Points

kill -9 496

when i type kill -9 496 . I received a -bash: kill: (496) - No such process.

2 Answers

Stephen Layton
Stephen Layton
8,643 Points

It is possible that the PID doesn't exist. You can use ps aux to see a list of all processes for instance to see all node processes:

āžœ  ~  ps aux | grep node
www-data   950  0.4 17.5 996660 88132 ?        Sl   10:57   0:02 node index.js
www-data   956  0.3 16.3 993376 82036 ?        Sl   10:57   0:02 node index.js
www-data  1225  0.3 15.9 991732 80136 ?        Sl   10:57   0:02 node index.js
āžœ  ~  kill -9 956

If you tired to reload the page before loading it would have stopped the server when then error was received. I had this same problem- restarting the server with app.js node command and then using ps aux in a new tab worked for me. (note I attempted to reconnect after using ps aux, and the PID changed when I ran it again- so if you have this issue make sure to double check your PID).