无法安装离子cordova-res
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法安装离子cordova-res相关的知识,希望对你有一定的参考价值。
运行命令ionic cordova resources
时出现此错误:
cordova-res.cmd [cordova-res] module.js:549 [cordova-res] throw err; [cordova-res] ^ [cordova-res] [cordova-res] Error: Cannot find module 'F:IonicmyApp ode_modulescordova-resincordova-res' [cordova-res] at Function.Module._resolveFilename (module.js:547:15) [cordova-res] at Function.Module._load (module.js:474:25) [cordova-res] at Function.Module.runMain (module.js:693:10) [cordova-res] at startup (bootstrap_node.js:191:16) [cordova-res] at bootstrap_node.js:612:3 [ERROR] An error occurred while running subprocess cordova-res. cordova-res.cmd exited with exit code 1. Re-running this command with the --verbose flag may provide more information. And while installing cordova-res i am getting this error: npm install cordova-res -g npm WARN notsup Unsupported engine for cordova-res@0.14.0: wanted: {"node":">=10.3.0"} (current: {"node":"8.11.3","npm":"6.14.5"}) npm WARN notsup Not compatible with your version of node/npm: cordova-res@0.14.0 npm WARN notsup Unsupported engine for @ionic/utils-fs@3.1.2: wanted: {"node":">=10.3.0"} (current: {"node":"8.11.3","npm":"6.14.5"}) npm WARN notsup Not compatible with your version of node/npm: @ionic/utils-fs@3.1.2 npm WARN notsup Unsupported engine for sharp@0.25.2: wanted: {"node":">=10"} (current: {"node":"8.11.3","npm":"6.14.5"}) npm WARN notsup Not compatible with your version of node/npm: sharp@0.25.2 npm WARN notsup Unsupported engine for fs-extra@9.0.0: wanted: {"node":">=10"} (current: {"node":"8.11.3","npm":"6.14.5"}) npm WARN notsup Not compatible with your version of node/npm: fs-extra@9.0.0 npm WARN notsup Unsupported engine for universalify@1.0.0: wanted: {"node":">= 10.0.0"} (current: {"node":"8.11.3","npm":"6.14.5"}) npm WARN notsup Not compatible with your version of node/npm: universalify@1.0.0 npm WARN notsup Unsupported engine for tar@6.0.2: wanted: {"node":">= 10"} (current: {"node":"8.11.3","npm":"6.14.5"}) npm WARN notsup Not compatible with your version of node/npm: tar@6.0.2 npm WARN notsup Unsupported engine for semver@7.3.2: wanted: {"node":">=10"} (current: {"node":"8.11.3","npm":"6.14.5"}) npm WARN notsup Not compatible with your version of node/npm: semver@7.3.2 npm WARN notsup Unsupported engine for chownr@2.0.0: wanted: {"node":">=10"} (current: {"node":"8.11.3","npm":"6.14.5"}) npm WARN notsup Not compatible with your version of node/npm: chownr@2.0.0 npm WARN notsup Unsupported engine for mkdirp@1.0.4: wanted: {"node":">=10"} (current: {"node":"8.11.3","npm":"6.14.5"}) npm WARN notsup Not compatible with your version of node/npm: mkdirp@1.0.4 npm ERR! code EEXIST npm ERR! path C:UsersmanavAppDataRoaming pm ode_modulescordova-resincordova-res npm ERR! dest C:UsersmanavAppDataRoaming pmcordova-res npm ERR! EEXIST: file already exists, cmd shim 'C:UsersmanavAppDataRoaming pm ode_modulescordova-resincordova-res' -> 'C:UsersmanavAppDataRoaming pmcordova-res' npm ERR! File exists: C:UsersmanavAppDataRoaming pmcordova-res 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:UsersmanavAppDataRoaming pm-cache\_logs2020-05-09T22_09_12_401Z-debug.log
请检查并帮助我摆脱它。
谢谢!
答案
如错误所言...
npm WARN notsup cordova-res@0.14.0不受支持的引擎:想要的:{“ node”:“> = 10.3.0”}(当前:{“ node”:“ 8.11.3”,“ npm” :“ 6.14.5”})
您需要更高版本的节点。...尝试检查当前版本并尝试更新它。
以上是关于无法安装离子cordova-res的主要内容,如果未能解决你的问题,请参考以下文章