Roxx
Roxx

Reputation: 3986

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?

Upvotes: 1

Views: 1492

Answers (2)

Jagadeesh
Jagadeesh

Reputation: 539

If you got the cordova: plugin is not on npm while building the app try the following configuration for phonegap/cordova plugins. Change Plugin name and value is the package name of plugin.

<plugins>
  <plugin name="cordova-plugin-device" value="org.apache.cordova.Device"/>
  <plugin name="cordova-plugin-network-information" value="CDVConnection" />
  <plugin name="cordova-plugin-globalization" value="CDVLocation" />
  <plugin name="cordova-plugin-splashscreen" value="CDVSplashScreen" />
  <plugin name="cordova-plugin-contacts"   value="org.apache.cordova.contacts" />
  <plugin name="cordova-plugin-inappbrowser" value="org.apache.cordova.inappbrowser" />
  <plugin name="phonegap-plugin-push" spec="1.5.3" /> 

Upvotes: 0

Arpit Vasani
Arpit Vasani

Reputation: 1023

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

Upvotes: 4

Related Questions