【问题标题】:node-inspector installation failure: npm ERR! Cannot read property 'pause' of undefined节点检查器安装失败:npm ERR!无法读取未定义的属性“暂停”
【发布时间】:2017-09-24 18:02:25
【问题描述】:

在 npm 5.3.0 下安装节点检查器失败

eric@mouni2:~$ sudo npm install -g node-inspector
> v8-profiler@5.7.0 preinstall /usr/local/lib/node_modules/node-inspector/node_modules/v8-profiler
> node -e 'process.exit(0)'

npm ERR! Cannot read property 'pause' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/eric/.npm/_logs/2017-09-24T09_34_28_089Z-debug.log

这可能与npm ERR! Cannot read property 'pause' of undefined --Bluemix有关。

【问题讨论】:

    标签: node.js node-inspector


    【解决方案1】:

    根据npm issue 16677 周围的帖子,您显然可以删除~/.npm,尽管npm cache verify(无需root 访问权限)似乎更优雅:

    eric@mouni2:~$ npm cache verify
    Cache verified and compressed (~/.npm/_cacache):
    Content verified: 1077 (29065069 bytes)
    Content garbage-collected: 15 (201214 bytes)
    Index entries: 1442
    Finished in 1.482s
    eric@mouni2:~$ sudo npm install -g node-inspector
    /usr/local/bin/node-inspector -> /usr/local/lib/node_modules/node-inspector/bin/inspector.js
    /usr/local/bin/node-debug -> /usr/local/lib/node_modules/node-inspector/bin/node-debug.js
    + node-inspector@1.1.1
    updated 1 package in 9.692s
    

    【讨论】:

      猜你喜欢
      • 2022-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-12
      • 1970-01-01
      • 2019-11-21
      • 2019-08-08
      • 2020-05-16
      相关资源
      最近更新 更多