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 Express Basics (2015) Developing Express Apps Like a Boss Interactive Debugging and Exploratory Programming

jsdevtom
jsdevtom
16,963 Points

Why is there an error on clicking the play button in debugger?

In zsh console the error is as follows

events.js:154
      throw er; // Unhandled 'error' event
      ^
Error: listen EADDRINUSE :::3000
    at Object.exports._errnoException (util.js:856:11)
    at exports._exceptionWithHostPort (util.js:879:20)
    at Server._listen2 (net.js:1236:14)
    at listen (net.js:1272:10)
    at Server.listen (net.js:1368:5)
    at EventEmitter.listen (C:\users\{{meuser}}\documents\webpages\projects\treehouse-express-basics\node_modules\express\lib\application.js:617:24)
    at Object.<anonymous> (C:\users\{{meuser}}\documents\webpages\projects\treehouse-express-basics\src\app.js:16:5)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)

In the chrome debugger I get a flash of "Error: read ECONNRESET Check there is no other debugger client attached to port 5858." before going to the "This webpage is not available ERR_CONNECTION_REFUSED" chrome page.

Why? Why me?

1 Answer

jsdevtom
jsdevtom
16,963 Points

Solution: I didn't clone git repository listed in the teachers notes at the beginning.

After cloning them, something was still listening to port 5858 however, which then caused the Error: listen EADDRINUSE :::5858.

So I ran netstat -o | grep :5858 (Although netstat -a -n -o | findstr :5858 seems to work aswell) in zsh which told me that Process ID (PID) 5728 was listening to port 5858. I then killed that process using taskkill /pid 5728 (Sometimes you have to use the /F at the end of this command in order to force kill it).

I hope this helps somebody. I think if everyone posted their solutions to their problems once they found them, even if they didn't ask on here, we could learn quicker. :-)