cordova 安裝插件失敗

問題如下:

G:\Work\AMC>cordova plugin add cordova-plugin-app-version
(node:9884) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch plugin cordova-plugi
n-app-version via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963238 Error output:
npm WARN myapp@1.1.1 No repository field.
npm WARN myapp@1.1.1 No license field.

npm ERR! path G:\Work\AMC\node_modules\_glob@7.1.3@glob\node_modules\fs.realpath
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'G:\Work\AMC\node_modules\_glob@7.1.3@glob\node_modules\fs.realpath' -> 'G:\Work\AMC\
node_modules\_glob@7.1.3@glob\node_modules\fs.realpath'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\Nodejs\node_cache\_logs\2018-09-21T14_58_53_089Z-debug.log
(node:9884) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled w
ill terminate the Node.js process with a non-zero exit code.

重點(diǎn)信息如下:

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1):
CordovaError: Failed to fetch plugin cordova-plugin-app-version via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.

解決方法如下:

把代碼中與 該插件相關(guān)的部分代碼注釋掉,在下載就可以了

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Android 自定義View的各種姿勢(shì)1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 178,872評(píng)論 25 709
  • 用兩張圖告訴你,為什么你的 App 會(huì)卡頓? - Android - 掘金 Cover 有什么料? 從這篇文章中你...
    hw1212閱讀 13,935評(píng)論 2 59
  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,533評(píng)論 19 139
  • 1、通過CocoaPods安裝項(xiàng)目名稱項(xiàng)目信息 AFNetworking網(wǎng)絡(luò)請(qǐng)求組件 FMDB本地?cái)?shù)據(jù)庫組件 SD...
    陽明AI閱讀 16,186評(píng)論 3 119
  • 莊子在《養(yǎng)生主》中講了這樣一句話:“吾生也有涯,而知也無涯,以有涯隨無涯,殆矣。已而為知者,殆而已矣。”已經(jīng)知道這...
    匆匆那年沒留住閱讀 180評(píng)論 1 0

友情鏈接更多精彩內(nèi)容