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!

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


Jack Hegarty
Jack Hegarty
9,381 Points

Created new git clone. When I start the node server I receive an error and it appears my old server is still running???

I messed up somewhere along the way and decided to clone Huston's git repo to a brand new folder on my machine.

When I go to run this new server via nodemon I receive this error:

module.js:338 throw err; ^ Error: Cannot find module 'express' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (C:\Users\jhegarty\desktop\expressproject\express-basics\src\app.js:3:15) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10) [nodemon] app crashed - waiting for file changes before starting...

When I got to localhost:3000 - I can tell that it is serving files from my OLD project and I can make changes to my OLD file and they will showup. I CANNOT figure out how to kill the old node server so I can continue with my new clone.

If i go to my localhost:3000 with no servers running it should not serve me anything correct? How can I kill my old server so I can run my new one?

It depends on your system but SO shows you how to kill the node servers http://stackoverflow.com/questions/14790910/stop-all-instances-of-node-js-server