bug宝典Node篇 node-inspector cb(error, NM[0].ref);

来源:互联网 发布:淘宝上卖真蜂蜜的店铺 编辑:程序博客网 时间:2024/06/04 01:17

使用node-inspector调试的时候,提示下面的异常,我的node版本是6.9.2出现下面的异常,我同事的版本4.2.1就没有这个问题。

C:\Users\dzm>node-inspector --web-port=8888Node Inspector v0.12.8Visit http://127.0.0.1:8888/?port=5858 to start debugging.C:\Users\dzm\AppData\Roaming\npm\node_modules\node-inspector\lib\InjectorClient.js:111      cb(error, NM[0].ref);                     ^TypeError: Cannot read property 'ref' of undefined    at InjectorClient.<anonymous> (C:\Users\dzm\AppData\Roaming\npm\node_modules\node-inspector\lib\InjectorClient.js:111:22)    at C:\Users\dzm\AppData\Roaming\npm\node_modules\node-inspector\lib\DebuggerClient.js:121:7    at Object.value (C:\Users\dzm\AppData\Roaming\npm\node_modules\node-inspector\lib\callback.js:23:20)    at Debugger._processResponse (C:\Users\dzm\AppData\Roaming\npm\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:176:18)    at Socket.Readable.push (_stream_readable.js:134:10)    at TCP.onread (net.js:548:20)

解决办法是找到C:\Users\dzm\AppData\Roaming\npm\node_modules\node-inspector\lib\InjectorClient.
js
的第111行,修改如下:
1

0 0
原创粉丝点击