title: "Error: Uncaught (in promise): TypeError: Object(...) is not a function" using UniqueDeviceID
body: <p>I am developing a project on ionic v3.<br>
  I want to get a unique device id in my application.<br>
  I followed the instructions at <a href="https://ionicframework.com/docs/native/unique-device-id/" rel="nofollow noreferrer">https://ionicframework.com/docs/native/unique-device-id/</a></p>
  
  <p><strong>ts file:</strong></p>
  
  <pre><code>import { UniqueDeviceID } from '@ionic-native/unique-device-id/ngx';   
  
  constructor(private uniqueDeviceID: UniqueDeviceID) { }
  
  login(){
    this.uniqueDeviceID.get()
     .then((uuid: any) =&gt; console.log(uuid))
     .catch((error: any) =&gt; console.log(error)); 
  }
  </code></pre>
  
  <p><strong>In app.module.ts :</strong>  </p>
  
  <pre><code>import { UniqueDeviceID } from '@ionic-native/unique-device-id/ngx';
  
  providers: [
      StatusBar,
      SplashScreen,
      UniqueDeviceID,
      { provide: ErrorHandler, useClass: IonicErrorHandler },
      AuthServiceProvider
    ]
  </code></pre>
  
  <p>When I am running it error occur:    </p>
  
  <blockquote>
    <p>Error: Uncaught (in promise): TypeError: Object(...) is not a function<br>
    TypeError: Object(...) is not a function    </p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/WuaK8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WuaK8.png" alt="enter image description here"></a></p>
  
  <p><strong>package.json</strong>   </p>
  
  <pre><code>{
    "name": "sujagSindhiSamiti",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
      "start": "ionic-app-scripts serve",
      "clean": "ionic-app-scripts clean",
      "build": "ionic-app-scripts build",
      "lint": "ionic-app-scripts lint"
    },
    "dependencies": {
      "@angular/animations": "5.2.11",
      "@angular/common": "5.2.11",
      "@angular/compiler": "5.2.11",
      "@angular/compiler-cli": "5.2.11",
      "@angular/core": "5.2.11",
      "@angular/forms": "5.2.11",
      "@angular/platform-browser": "5.2.11",
      "@angular/platform-browser-dynamic": "5.2.11",
      "@ionic-native/core": "4.20.0",
      "@ionic-native/device": "^5.19.1",
      "@ionic-native/splash-screen": "4.20.0",
      "@ionic-native/status-bar": "4.20.0",
      "@ionic-native/unique-device-id": "^5.19.1",
      "@ionic/storage": "2.2.0",
      "cordova-android": "8.1.0",
      "cordova-plugin-uniquedeviceid": "1.3.2",
      "ionic-angular": "3.9.9",
      "ionicons": "3.0.0",
      "rxjs": "5.5.11",
      "sw-toolbox": "3.6.0",
      "zone.js": "0.8.29"
    },
    "devDependencies": {
      "@ionic/app-scripts": "3.2.4",
      "cordova-plugin-device": "^2.0.2",
      "cordova-plugin-ionic-keyboard": "^2.2.0",
      "cordova-plugin-ionic-webview": "^4.1.3",
      "cordova-plugin-splashscreen": "^5.0.2",
      "cordova-plugin-statusbar": "^2.4.2",
      "cordova-plugin-whitelist": "^1.3.3",
      "typescript": "2.6.2"
    },
    "description": "An Ionic project",
    "cordova": {
      "plugins": {
        "cordova-plugin-whitelist": {},
        "cordova-plugin-statusbar": {},
        "cordova-plugin-device": {},
        "cordova-plugin-splashscreen": {},
        "cordova-plugin-ionic-webview": {
          "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
        },
        "cordova-plugin-ionic-keyboard": {},
        "cordova-plugin-uniquedeviceid": {}
      },
      "platforms": [
        "android"
      ]
    }
  }
  </code></pre>