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

我怕爱的太早我们不能终老 提交于 2019-12-03 07:26:32

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

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..

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!!

Try below

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

READ MORE

Hope this helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!