How to remove installed ionic cordova plugin from ionic 2 / 3 or ionic V2+ project

后端 未结 4 1852
情深已故
情深已故 2021-02-13 14:22

I installed Cordova and Ionic Native plugins into the ionic3 project.

But I need to remove only that specific Cordova and Ionic Native plugins from the project complete

相关标签:
4条回答
  • 2021-02-13 14:33

    Try below

    ionic cordova plugin remove <PLUGIN_NAME> --no-interactive

    READ MORE

    Hope this helps

    0 讨论(0)
  • 2021-02-13 14:47

    You can use the following command to remove

    ionic cordova plugin rm <plugin name>
    

    Example :

    ionic cordova plugin rm cordova-plugin-camera
    

    Please check the similar type of question to here.

    Also please check the documentation of plugin commands from here.

    Hope this will help you!!

    0 讨论(0)
  • 2021-02-13 14:47

    please make sure that you also run npm uninstall after ionic cordova remove skipping this may lead to serious consequences like for instance the BUILD is successful but some of features in the App fails in the runtime complaining the plugin is missing, what must have happened in this case is re installation must have silently failed as the plugin source still exists due to not performing npm uninstall, such mistakes do happen while migrations, upgrade to new CLI. In my case InAppPurchase2 plugin did not work, payments stopped working :(, something quite miserable isn't it..hope the lesson helps someone out there..

    0 讨论(0)
  • 2021-02-13 14:53

    I just refer their document here.

    Example:

    To install a plugin we are using following way.

    ionic cordova plugin add <plugin-name>

    (ionic cordova plugin add cordova-plugin-dialogs)

    npm install --save @ionic-native/<npm-name-of-plugin>

    (npm install --save @ionic-native/dialogs)

    To Uninstall the plugin just need to revert above things back as bellow

    ionic cordova plugin remove <plugin-name> or ionic cordova plugin rm <plugin-name>

    (ionic cordova plugin remove cordova-plugin-dialogs) or (ionic cordova plugin rm cordova-plugin-dialogs)

    Finally uninstall the associated Ionic Native package(s) from npm

    npm uninstall --save @ionic-native/<npm-name-of-plugin>

    (npm uninstall --save @ionic-native/dialogs)

    The --save flag will remove the project's package.json entry for that plugin

    Doing above things helps me to remove plugin completely with its npm dependencies from the project. Hope this will useful to someone else

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