Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova plugin remove/add are taking very long

Tags:

cordova

I have cordova 8.0.0 and I'm using cordova-android 7.1.

Everytime I run a command like

cordova plugin remove ...
# or
cordova plugin add ...

The commands take 8+ minutes to end. I checked my network stats and I saw that node is downloading loads of things the whole time. Seems like it's fetching every plugin at every command.

Why is cordova doing that? It's slowing so much my development...

like image 905
Hugo H Avatar asked Mar 02 '18 11:03

Hugo H


People also ask

How do I remove a cordova plugin?

Removing plugins 'cordova plugin remove cordova-plugin-console --save' => Removes the console plugin from the project and deletes its entry from config. xml.

How do I remove a plugin capacitor?

Plugins are installed as npm or yarn package in Capacitor. Hence, to remove them, You will have to remove the package from package. json and also remove it from node_modules using npm uninstall <packageName>


1 Answers

So, I don't know why but I had some dependencies issues. The next time I ran npm i ... for another package, it took loads of time (as long as after every cordova command), and I got a message saying than more than one package has been updated.

Then the next cordova commands ran really faster.

So it seems that if you have some uninstalled npm packages in your package.json file, cordova 8.0.0 is downloading them at every command...

like image 82
Hugo H Avatar answered Oct 21 '22 11:10

Hugo H