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 trialBrendan Moran
14,052 PointsRemote debugging terminated (websocket_closed)
I can't get node inspector to work. When I go to the given address, I get an error message to the effect of "Detached from target. Debugging terminated with reason: websocket_closed. Please re-attach to the new target."
Also, something that looked strange to me was that when I run the node-debug command, I get this message:
Debugger listening on [::]:5858
Does that mean there are two other processes running previously on that port? Is it possible to change the port that debugger runs on, or is 5858 used specifically for debugging? I'm going to look into changing the port, if possible, and see if that helps. Tried a google search about this error and it turned up nothing useful.
Anyone here have any ideas?
7 Answers
Sebastian H
19,905 PointsI was having the same issue. Not sure what is causing the problem but I rolled back from node v6.4.0 to v6.3.1 and things are working again https://github.com/node-inspector/node-inspector/issues/905
Brendan Moran
14,052 PointsYes, you are right about that! I should have updated this post. I filed an issue on the github repo for nodemon, and someone had this answer. Sure enough, a few days ago I rolled back node, and everything is working fine after that. It was also a great opportunity to reconfigure my system with nvm. Apparently you need to uninstall node, install nvm (with brew if on mac), and then use nvm to install node (and of course npm comes with it). Was a fun learning experience.
watson13j
Courses Plus Student 9,130 PointsIt's pretty clear looking at the Issues page on node-inspector's github that it's broken with almost every recent version of Node. The project hasn't been updated in six months, and Node seems to be moving towards the V8 Inspector, which was added to 6.3.
This video should probably be deprecated and replaced.
Marc Maycas
Python Web Development Techdegree Student 26,884 PointsI had the same issue as well, and it even got worse when upgrading to node v7.0.0. However the solution to this issue can be found here
You don't need to use node-inspector with versions higher than 6.3.8, you can use the Chrome Dev Tools
SCU ACM
32,149 PointsHow would you use nvm to install node? I couldn't get it at that step. When I do, nvm install node, I get a message saying "command not found: nvm". Please help if you can. Thank you
Brendan Moran
14,052 PointsDo brew uninstall node, then, do brew install nvm. I am working on Mac terminal, and when I installed nvm I was notified that I had to add some commands to my shell confit. This is necessary to run nvm. Then do nvm install node followed by the version number you want to install.
Check out the nvm readme for more info:
https://github.com/creationix/nvm/blob/master/README.markdown
Note that brew is not supported, but I am having no problem. Nvm installation can be a bit tricky and there is disagreement on how to install. I had o experiment. I ended up following this (more or less):
I didn't do step 4 or 5 there.
Sebastian H
19,905 PointsIt sounds like nvm isn't installed if the nvm command isn't found. Try running
nvm --version
to verify that nvm is installed. If not, uninstall node and install nvm using all of the great info Brendan just posted. If you are installing nvm to use a specific version of node, you have to make sure that version of node is installed, and then tell nvm to use that version. So for rolling back to v6.3.1 I did the following:
nvm install v6.3.1
nvm use v6.3.1
fredyrosales
10,572 PointsAll i did was install the v8 Inspector extension in Google Chrome. Then i installed it via npm install v8-inspector -g. After that i ran it by, nodemon --inspect --debug-brk src/app.js! Finally you just click on the extension button on the upper right, and run it as the default port. Not 3000. 9229 to be exact.
Bob Sutherton
20,160 PointsFrustrating. Apparently node-inspector is going out of style. In newer versions of node there is a node --inspect built in. I wasn't hip on reverting to an older version of node to get acquainted with something outdated. I found this article helpful instead.