3
votes

I have a cordova plugin in my local. I can add it to my project without problems by typing:

cordova plugin add --link /Users/goforu/WorkSpace/MyProject/cordovaPlugins/cordova-plugin-IFlyspeech

But I can't remove it from my project:

cordova plugin remove cordova-plugin-xunfeiListenSpeaking

It always logs error

Error: Plugin "cordova-plugin-xunfeiListenSpeaking" is not present in the project. See cordova plugin list.

When I type cordova plugin list I get this:

cordova-plugin-console 1.0.5 "Console" cordova-plugin-device 1.1.4 "Device" cordova-plugin-splashscreen 4.0.3 "Splashscreen" cordova-plugin-statusbar 2.2.1 "StatusBar" cordova-plugin-whitelist 1.3.1 "Whitelist" cordova-plugin-xunfeiListenSpeaking 0.0.1 "cordova-plugin-xunfeiListenSpeaking" cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin" "Cordova sqlite storage plugin" ionic-plugin-keyboard 2.2.1 "Keyboard" {}

And I also noticed that every time I remove and add android platform, this plugin will not get installed in project.

Problem solved: As jcesarmobile said, maybe it's a bug. I solved this problem by getting rid of the '--link'. And now it works properly.

2
did you try adding the plugin with --save option? - Suraj Rao
Yes, I tried. It didn't work. - goforu

2 Answers

4
votes

It's a bug when using --link. I've already reported it.

Anyway, --link is broken too, so don't use it. You don't really need it unless you are creating the plugin and want to have the changes on the original plugin folder when you edit it in your IDE.

0
votes

Yes, it is showing on running command

cordova plugin remove/rm  cordova-plugin-xunfeiListenSpeaking

Error: Plugin "cordova-plugin-xunfeiListenSpeaking" is not present in the project. See cordova plugin list.

because, really there is no plugin existing in the plugins list

but, the --link is broken as he said.

So, there is a workaround for it.you can just remove the node modules directly or by using the command. it will solve because there are node modules with your plugin name.

If still error permits, you can just remove and add platform android