Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

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