Upgrade cordova: cannot install plugins from git urls anymore

前端 未结 10 1537
眼角桃花
眼角桃花 2020-12-16 11:15

I did a cordova/phonegap upgrade and now I cannot install plugins from git urls anymore. Anyone experienced such an issue and already solved this?

$ cordova          


        
相关标签:
10条回答
  • 2020-12-16 11:26

    I had the same issue with Cordova on Windows 7. I had to roll back to 5.0.0 (npm install -g cordova@5.0.0) to make it work again.

    0 讨论(0)
  • 2020-12-16 11:27

    A quick fix is to clone the git locally and provide the path from there. For a plug-in to start working, all it needs is to see the plugin.xml file

    So cordova plugin add https://github.com/phonegap/phonegap-plugin-fast-canvas.git -- fails because

    shell.js: internal error Error: EXDEV, cross-device link not permitted '/ -- normal error in Cordova 5.1.0+. Applies to most if not all .git install

    Local clone :: git clone https://github.com/phonegap/phonegap-plugin-fast-canvas.git

    And local install cordova plugin add /path/to/phonegap-plugin-fast-canvas

    Works.

    0 讨论(0)
  • 2020-12-16 11:31

    sudo npm install -g cordova@5.0.0

    sudo cordova plugin add https://github.com/litehelpers/Cordova-sqlite-storage.git

    0 讨论(0)
  • 2020-12-16 11:32

    I had the same situation with you. and resvole this problem need to pull back the cordova to 5.0.0

    0 讨论(0)
  • 2020-12-16 11:35

    This issue is fixed in the latest cordova version(5.2.0).

    Upgrade Cordova using npm install -g cordova

    0 讨论(0)
  • 2020-12-16 11:36

    I had the same issue and got it resolved by following the advice of AMilassin (rolling back to Cordova Version 5.0) . Another issue I had was my Git installation path (C:\Program Files\Git\bin) was not added to the Environment Variables. Once I fixed both issues, I was able to install the plugins I needed.

    0 讨论(0)
提交回复
热议问题