@cordova Uncaught TypeError: Object(...) is not a function

I have Created my custom plugin. Created its Wrapper using following steps

  1. Cloned the ionic native wrapper from
  2. Installed node modules and @ionic-native/core
  3. Created native wrapper using gulp
    gulp plugin:create -n @ionic-native/HelloWorld
  4. Changed index.ts file plugin information and added my functions to it
    pluginName: ‘Mathcalculator’,
    plugin: ‘cordova-plugin-Mathcalculator’, // npm package name, example: cordova-plugin-camera
    pluginRef: ‘Mathcalculator’, // the variable reference to call the plugin, example: navigator.geolocation
    repo: ‘https://github.com/baviskarmitesh/MathCalculator.git’, // the github repository URL for the plugin
    install: ‘’, // OPTIONAL install command, in case the plugin requires variables
    installVariables: , // OPTIONAL the plugin requires variables
    platforms: [‘Android’] // Array of platforms supported, example: [‘Android’, ‘iOS’]
    export class Mathcalculator extends IonicNativePlugin {


  • This function does something
  • @param arg1 {string} Some param to configure something
  • @param arg2 {number} Another param to configure something
  • @return {Promise} Returns a promise that resolves when something happens
    add(arg1: any): Promise {
    return; // We add return; here to avoid any IDE / Compiler errors


Copied this directory into my app

It Is giving me Uncaught TypeError: Object(…) is not a function on the line @cordova

Any suggession. Stuck since last few hours

Maybe version issue, your plugin not support to your current project

I have Created a sample Custom plugin using plugman for Android only. Where can be the version issue