title: How to fix problem due to providing '@ionic-native/AppVersion' or '.../ngx' and having exception when calling any methods of AppVersion?
body: <p>I've added the AppVersion Ionic native plugin (<a href="https://ionicframework.com/docs/native/app-version#usage" rel="nofollow noreferrer">https://ionicframework.com/docs/native/app-version#usage</a>). 
  After try to provide it into my <code>app.module.ts</code> i've an error at compilation like "No provider exists for AppVersion" ... </p>
  
  <p>I thinking that maybe from Ionic 4/recent version of AppVersion, i need to follow this instructions : <a href="https://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module" rel="nofollow noreferrer">https://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module</a> which say to provide the plugin into the <code>app.module.ts</code> with a import like this :</p>
  
  <p><code>import AppVersion from '@ionic-native/AppVersion/ngx'</code>. </p>
  
  <p>The code compile. Perfect. But sadly at runtime i have an error which say: </p>
  
  <p><code>TypeError: Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordova"]) is not a function. (In 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordova"])(this, "getPackageName", {}, arguments)', 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordova"])' is an instance of Object)
  getPackageName — index.js:28...</code></p>
  
  <p>So my solution to this time-consuming problem, was to take an hold version of the AppVersion, which works on another project : </p>
  
  <p><code>package.json</code> :</p>
  
  <pre><code>...
  "@ionic-native/app-version": "^4.18.0",
  ...
  "cordova-plugin-app-version": "0.1.9",
  ...
  </code></pre>
  
  <p>With this, i can import normally the plugin into my <code>app.module.ts</code> (<code>import AppVersion from '@ionic-native/AppVersion'</code>) and everything is ok.</p>
  
  <p>There is the versions of my stack :</p>
  
  <p><strong>Ionic:</strong></p>
  
  <p>ionic (Ionic CLI)  : 4.1.2 (/usr/local/lib/node_modules/ionic)
     Ionic Framework    : ionic-angular 3.9.2
     @ionic/app-scripts : 3.1.11</p>
  
  <p><strong>Cordova:</strong></p>
  
  <p>cordova (Cordova CLI) : 8.1.1 (cordova-lib@8.1.0)
     Cordova Platforms     : android 7.1.1, ios 4.5.5
     Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 8 other plugins)</p>
  
  <p><strong>System:</strong></p>
  
  <p>Android SDK Tools : 26.1.1 (/Users/maximedesogus/Library/Android/sdk/)
     ios-deploy        : 1.9.4
     NodeJS            : v8.12.0 (/usr/local/bin/node)
     npm               : 6.4.1
     OS                : macOS
     Xcode             : Xcode 10.1 Build version 10B61</p>