node-inspect调试时的一个bug修复
TypeError: Cannot read property 'ref' of undefined
at InjectorClient.<anonymous> (C:\Users\KELI\AppData\Roaming\npm\node_modules\node-inspector\lib\InjectorClient.js:110:20)
at C:\Users\KELI\AppData\Roaming\npm\node_modules\node-inspector\lib\DebuggerClient.js:121:7
at Object.value (C:\Users\KELI\AppData\Roaming\npm\node_modules\node-inspector\lib\callback.js:23:20)
at Debugger._processResponse (C:\Users\KELI\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)
解决方法 Node Inspector v0.12.7
打开路径 C:\Users\KELI\AppData\Roaming\npm\node_modules\node-inspector\lib\InjectorClient.js对应的111行修改代码为
if (!NM.length) error = new Error('No NativeModule in target scope'); if (NM.length) cb(error, NM[0].ref);