完整的错误信息为:
14 verbose stack Error: Unsupported URL Type "npm:": npm:@elastic/elasticsearch@7.13.0
14 verbose stack at unsupportedURLType (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modules
pm-package-arg
pa.js:197:15)
14 verbose stack at fromURL (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modules
pm-package-arg
pa.js:250:13)
14 verbose stack at Function.resolve (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modules
pm-package-arg
pa.js:71:12)
14 verbose stack at module.exports (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pmlibinstall
ealize-shrinkwrap-specifier.js:21:14)
14 verbose stack at BB.each (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pmlibinstallinflate-shrinkwrap.js:51:23)
14 verbose stack at tryCatcher (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
eleaseutil.js:16:23)
14 verbose stack at Object.gotValue (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
elease
educe.js:155:18)
14 verbose stack at Object.gotAccum (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
elease
educe.js:144:25)
14 verbose stack at Object.tryCatcher (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
eleaseutil.js:16:23)
14 verbose stack at Promise._settlePromiseFromHandler (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
eleasepromise.js:512:31)
14 verbose stack at Promise._settlePromise (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
eleasepromise.js:569:18)
14 verbose stack at Promise._settlePromise0 (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
eleasepromise.js:614:10)
14 verbose stack at Promise._settlePromises (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
eleasepromise.js:693:18)
14 verbose stack at Async._drainQueue (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
eleaseasync.js:133:16)
14 verbose stack at Async._drainQueues (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
eleaseasync.js:143:10)
14 verbose stack at Immediate.Async.drainQueues (C:UsershuyucAppDataRoaming
vmv8.9.4
ode_modules
pm
ode_modulesluebirdjs
eleaseasync.js:17:14)
15 verbose cwd D:WorkDirFacilityConneXSource-CodeServicesAPI
16 verbose Windows_NT 10.0.19043
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--frozen-lockfile"
18 verbose node v8.9.4
19 verbose npm v5.6.0
20 error code EUNSUPPORTEDPROTOCOL
21 error Unsupported URL Type "npm:": npm:@elastic/elasticsearch@7.13.0
22 verbose exit [ 1, true ]
从上面的错误信息我们来抓重点看就是第一行 verbose stack Error: Unsupported URL Type "npm:": npm:@elastic/elasticsearch@7.13.0
Unsupported URL Type 这个错误。
错误原因和解决
出现这个错误的原因是你的 node 版本可能过低了。
你需要切换使用更高一点的 node 版本。
如果你对切换 node 的版本和 NPM 之间的关系有什么不清楚的话,可以参考下面的内容:NPM 和 NVM
当你切换 node 版本完成后,再次尝试安装就应该能够解决你的这个问题了。
当我们切换版本完成后再次进行安装,就能够成功了。