我正在运行npm install -g node-inspector
命令并收到此错误,我不知道要升级什么以及如何升级?
我遇到的完整错误是:
C:\xampp\htdocs\node\debug>npm install -g node-inspector
npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
> v8-profiler@5.7.0 preinstall C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-profiler
> node -e 'process.exit(0)'
> v8-debug@1.0.1 preinstall C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node -e 'process.exit(0)'
C:\Users\ashwanipanwar\AppData\Roaming\npm\node-inspector -> C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\bin\inspector.js
C:\Users\ashwanipanwar\AppData\Roaming\npm\node-debug -> C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\bin\node-debug.js
> v8-debug@1.0.1 install C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/debug/v1.0.1/node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug@1.0.1 and node@10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://node-inspector.s3.amazonaws.com/debug/v1.0.1/node-v64-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug@1.0.1 and node@10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64\\debug.node" "--module_name=debug" "--module_path=C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64"
gyp ERR! cwd C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64\debug.node --module_name=debug --module_path=C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64' (1)
node-pre-gyp ERR!stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
stack at FSReqWrap.oncomplete (fs.js:154:21)
node-pre-gyp gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64\\debug.node" "--module_name=debug" "--module_path=C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v1.0.1\\node-v64-win32-x64"
gyp ERR! cwd C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
gyp ERR! node -v v10.15.0
ERR! stack at maybeClose (internal/child_process.js:962:16)
node-pre-gyp gypERR! ERR!stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-gyp -v v3.8.0
node-pre-gypgyp ERR!ERR! System Windows_NT 10.0.17134
not oknode-pre-gyp
ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ashwanipanwar\\AppData\\Roaming\\npm\\node_modules\\node-inspector\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64\debug.node --module_name=debug --module_path=C:\Users\ashwanipanwar\AppData\Roaming\npm\node_modules\node-inspector\node_modules\v8-debug\build\debug\v1.0.1\node-v64-win32-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! v8-debug@1.0.1 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug@1.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ashwanipanwar\AppData\Roaming\npm-cache\_logs\2019-02-18T06_14_35_105Z-debug.log
答案 0 :(得分:0)
您可以执行npm update <package name>
更新特定的更新。要全局更新它,可以使用-g。要更新所有过时的软件包,您可以仅使用npm update
要更新到特定版本,请在软件包后使用“ @packageversionname”,例如npm update express@1.0.2
如果仍然出现错误,请尝试先将其卸载并将其安装到特定版本