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

C:\Users\dzm>node-inspector --web-port=8888
Node Inspector v0.12.8
Visit 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\Debugger
Client.js:121:7
    at Object.value (C:\Users\dzm\AppData\Roaming\npm\node_modules\node-inspecto
r\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行,修改如下:
node-inspector调试报错问题处理

相关文章:

  • 2021-11-30
  • 2021-12-17
  • 2021-09-02
  • 2021-12-30
  • 2021-07-12
  • 2022-12-23
  • 2021-11-30
  • 2021-12-04
猜你喜欢
  • 2021-06-20
  • 2021-11-05
  • 2021-11-30
  • 2021-08-09
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案