Removing cordova plugins from the project

前端 未结 14 2064
情书的邮戳
情书的邮戳 2020-12-12 15:50

Somehow in my app many of the cordova plugins are installed and because of that it requires access to almost everything - from my contacts to current location ( even though

14条回答
  •  再見小時候
    2020-12-12 16:45

    When running the command: cordova plugin remove , ensure that you do not add the version number to the plugin name. Just plain plugin name, for example:

    cordova plugin remove cordova.plugin_name 
    

    and not:

    cordova plugin remove cordova.plugin_name 0.01 
    

    or

    cordova plugin remove "cordova.plugin_name 0.01"
    

    In case there is a privilege issue, run with sudo if you are on a *nix system, for example:

    sudo cordova plugin remove cordova.plugin_name
    

    Then you may add --save to remove it from the config.xml file. For example:

    cordova plugin remove cordova.plugin_name --save
    

提交回复
热议问题