gpt4 book ai didi

Cordova "failed to fetch plugin"错误

转载 作者:行者123 更新时间:2023-12-04 14:39:06 26 4
gpt4 key购买 nike

我最近经常遇到这个“无法获取插件错误”。如果我下载自己的分支,似乎特别容易支撑:

t2wu@THW-air:~/Documents/Work/John/DEMO_APP/BCAppII(dev) $ cordova plugin add https://github.com/t2wu/cordova-plugin-geofence.git#t2wu

Error: Failed to fetch plugin https://github.com/t2wu/cordova-plugin-geofence.git#t2wu via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module



如果我下载像 cordova plugin add cordova-plugin-geofence 这样的插件,但是当我必须使用特定的存储库时,尤其是该存储库上的分支时,它经常失败。

我正在使用 Cordova 7.1.0。 (Cordova 8 还有其他问题,我现在不想碰。)

最佳答案

请尝试以下操作:

cordova plugin add https://github.com/t2wu/cordova-plugin-geofence.git#t2wu --nofetch
如果它不起作用。执行以下步骤:
  • 删除所有平台 ( cordova platform rm android ) 和 ( cordova platform rm ios )
  • 删除所有插件 cordova plugin rm plugin-name .
  • 如果 step2 失败,则使用文件管理器从目录 <projectroot>/plugins 中删除所有插件。
  • 添加所有插件
  • 添加 https://github.com/t2wu/cordova-plugin-geofence.git#t2wu
  • 添加所有平台。
  • 关于 Cordova "failed to fetch plugin"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48293822/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com