【问题标题】:Cannot Install Ionic cordova-res无法安装 Ionic cordova-res
【发布时间】:2020-08-24 23:38:24
【问题描述】:

在运行命令 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:\Ionic\myApp\node_modules\cordova-res\bin\cordova-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:\Users\manav\AppData\Roaming\npm\node_modules\cordova-res\bin\cordova-res
npm ERR! dest C:\Users\manav\AppData\Roaming\npm\cordova-res
npm ERR! EEXIST: file already exists, cmd shim 'C:\Users\manav\AppData\Roaming\npm\node_modules\cordova-res\bin\cordova-res' -> 'C:\Users\manav\AppData\Roaming\npm\cordova-res'
npm ERR! File exists: C:\Users\manav\AppData\Roaming\npm\cordova-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:\Users\manav\AppData\Roaming\npm-cache\_logs\2020-05-09T22_09_12_401Z-debug.log

检查一下并帮助我摆脱它。

谢谢!

【问题讨论】:

    标签: node.js cordova ionic-framework npm


    【解决方案1】:

    正如错误所说...

    npm WARN notsup 不支持 cordova-res@0.14.0 的引擎:想要:{"node":">=10.3.0"}(当前:{"node":"8.11.3"," npm":"6.14.5"})

    您需要更高版本的节点.... 尝试检查当前版本a并尝试更新它..

    【讨论】:

    • 和OP有同样的问题。但似乎 6.14.5 版是当前可用的 npm 版本.... 至少通过从 nodejs.org/en/download 下载 - 那么如何安装任何更新的版本?
    猜你喜欢
    • 2020-02-20
    • 1970-01-01
    • 2019-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-13
    • 2016-02-22
    • 1970-01-01
    相关资源
    最近更新 更多