Detached from the target, websocket_closed, cannot read property ref of undefined (NM[0] is undefined)
See original GitHub issueDoing node-debug src/app.js
The immediate feedback from the terminal is :
Node Inspector v0.12.8
Visit http://127.0.0.1:8080/?port=5858 to start debugging.
Debugging src/app.js
Debugger listening on [::]:5858
After chrome automatically launches and tries to display the page, the chrome windows show this error message:
“Detached from the target. Remote debugging has been terminated with reason: websocket_closed. Please re-attach to the new target.”
And the console shows this error:
/usr/local/lib/node_modules/node-inspector/lib/InjectorClient.js:111
cb(error, NM[0].ref);
^
TypeError: Cannot read property 'ref' of undefined
at InjectorClient.<anonymous> (/usr/local/lib/node_modules/node-inspector/lib/InjectorClient.js:111:22)
at /usr/local/lib/node_modules/node-inspector/lib/DebuggerClient.js:121:7
at Object.create.processResponse.value (/usr/local/lib/node_modules/node-inspector/lib/callback.js:23:20)
at Debugger._processResponse (/usr/local/lib/node_modules/node-inspector/lib/debugger.js:95:21)
at Protocol.execute (_debugger.js:121:14)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:177:18)
at Socket.Readable.push (_stream_readable.js:135:10)
at TCP.onread (net.js:542:20)
I’ve searched everywhere for a solution to this problem and haven’t found one. I hope you can be of assistance!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:121
- Comments:78
Top Results From Across the Web
Cannot debug Nodejs with node-inspector - Websocket_closed
you can see Github issues Detached from the target, websocket_closed, cannot read property ref of undefined (NM[0] is undefined).
Read more >Remote debugging has been terminated with reason
Detached from target Remote debugging has been terminated with reason: webso... ... TypeError: Cannot read property 'ref' of undefined ...
Read more >How to Read React Errors (fix 'Cannot read property of ...
Got an error like this in your React component? Cannot read property `map` of undefined. In this post we'll talk about how to...
Read more >'TypeError: Cannot read property 'components' of ... - TI E2E
TMS320F28379D: 'TypeError: Cannot read property 'components' of undefined' when using .syscfg to add a GPIO target board LAUNCCXL-F28379.
Read more >Use ES6 Arrow Functions to Resolve "TypeError - Pluralsight
1TypeError : Cannot read property '<your property name>' of undefined. If you run into this error while writing React, the odds are high...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same issue with node v6.5.0 can be solved like this :
Edit …\node_modules\node-inspector\lib\InjectorClient.js file at line 111 if(NM.length > 0) cb(error, NM[0].ref);
It works
my problem can also be solved like this :
Edit …\node_modules\node-inspector\lib\InjectorClient.js file at line 111 if(NM.length > 0) cb(error, NM[0].ref);
It works well!!!