Search code examples
cordovaphonegap-pluginscordova-pluginsphonegap-build

cordova: plugin is not on npm:


I am working on cordova application. At the moment i am using external plugin. com.ourcodeworld.plugins.Filebrowser

When i try to build the application from https://build.phonegap.com it is faling with below error.

Error - The following plugin, plugin version or a dependancy of this plugin is not on npm: com.ourcodeworld.plugins.Filebrowser@~1.0.0

I have added the plugin in config.xml

<plugin name="com.ourcodeworld.plugins.Filebrowser" source="npm" spec="~1.0.0" />

I can see plugin in plugin directory on my local machine. Any advise what am i doing wrong?


Solution

  • As per their blog post you can add plugins from git repositories.

    so upload the plugin you have in local system to GitHub or bitbucket public repository and use it's path in your config.xml like following

    // install plugin from a git repository (name is optional)
    <plugin spec="https://github.com/example/cordova-plugin.git" source="git" />
    
    
    // it doesn't have to be GitHub, it can be any git server
    <plugin spec="https://bitbucket.org/example/cordova-plugin.git" source="git" />
    

    you can checkout more options in the Docs