繁体   English   中英

无法在 Windows 终端中安装节点检查器

[英]Unable to install Node-Inspector in Windows Terminal

我是 NodeJS 的新手,并尝试在 Windows 终端上安装 Node-Inspector。 我在安装时收到此错误。

 PS C:\Users\rahul> npm install -g node-inspector
npm WARN deprecated hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated request@2.81.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated sntp@1.0.9: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
m/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@2.16.3: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated har-validator@4.2.1: this library is no longer supported

> v8-profiler@5.7.0 preinstall C:\Users\rahul\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-profiler
> node -e 'process.exit(0)'


> v8-debug@1.0.1 preinstall C:\Users\rahul\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node -e 'process.exit(0)'

npm ERR! code EEXIST
npm ERR! dest C:\Users\rahul\AppData\Roaming\npm\node-inspector.cmd
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\rahul\AppData\Roaming\npm\node_modules\node-inspector\bin\inspector.js' -> 'C:\Users\rahul\AppData\Roaming\npm\node-inspector.cmd'
npm ERR! File exists: C:\Users\rahul\AppData\Roaming\npm\node-inspector.cmd
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\rahul\AppData\Roaming\npm-cache\_logs\2020-10-02T12_36_01_288Z-debug.log
PS C:\Users\rahul> node-inspector
internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module 'C:\Users\rahul\AppData\Roaming\npm\node_modules\node-inspector\bin\inspector.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

我也将 ubuntu 安装为 WSL。 谢谢。

尝试覆盖当前安装的版本: npm install -g node-inspector --force

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM