Issue in using custom Cordova plugin with Ionic app


#1

Hi,

I am trying to use a custom built plugin with my Ionic2 app. I am able to add the plugin using the command - cordova plugin add ‘plugin/path/on/local/machine’. However, when I try to build the app using the command - ionic build android, I am getting below error:


Discovered plugin “MyPluginName” in config.xml. Adding it to the project.
Failed to restore plugin “MyPluginName” from config.xml. You might need to try adding it again. Error: Error: Registry returned 404 for GET on https://registry.npmjs.org/MyPluginName

Could someone help me resolve this issue?

Thanks,
svvrls


#2

Not helping, sorry, but: This question is pure Cordova. You might want to google for instructions how to build a custom Cordova plugin. There is also a Google group and a Slack for Cordova stuff where you might ask this. (Let us know if you get it solved though!)


#3

Thank you. It is working.


#4

How did you solve it?


#5

Plugin id in plugin.xml had period ( . ). I replaced it with ( - ). This fixed the issue.