I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/
Current behavior:
I've needed to update my AngularFire version which led to upgrading my rxjs version to 6, which led to the ionic native plugins not responding (splashscreen, apprate, push, firebase, email composer, etc). So i've updated all of the native plugins to 5.0.0-beta.13 but now my app.module.ts says ALL of them cannot be assigned to where they should be. Also the entire @NgModule({ block comes up as an error in VSCODE. I have been trying to update anything and everything I could to get this to work so i'm not really sure where i'm at version wise for everything. Angular packages are 6.0.7. Wherever these items are located it says "Cannot find name 'Plugin'", for example Cannot find name 'SplashScreen'.
Related code:
Argument of type '{ declarations: (typeof FirebaseSettingsPage | typeof FirebaseProfilePage | typeof
FirebaseLoginP...' is not assignable to parameter of type 'NgModule'. Types of property 'providers' are
incompatible. Type '(SplashScreenOriginal | StatusBarOriginal | typeof FirebaseService | typeof
FirebaseAuthService |...' is not assignable to type 'Provider[]'. Type 'SplashScreenOriginal |
StatusBarOriginal | typeof FirebaseService | typeof FirebaseAuthService | ...' is not assignable to type
'Provider'. Type 'SplashScreenOriginal' is not assignable to type 'Provider'. Type 'SplashScreenOriginal' is
not assignable to type 'ClassProvider'. Property 'provide' is missing in type 'SplashScreenOriginal'.
Other information:
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
Ionic:
ionic (Ionic CLI) : 4.0.0-rc.9 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.10
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : ios 4.5.4
System:
NodeJS : v8.11.3 (/usr/local/bin/node)
npm : 6.1.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000
Environment:
ANDROID_HOME : not set
You have to change your imports to "import { Geolocation } from '@ionic-native/splashscreen/ngx'" and so on (Read more here: https://blog.ionicframework.com/help-test-ionic-native-5/)
If you still have problems you can use ionic native v4 together with "rxjs-compat".
What does the /ngx indicate? I searched high and low for an upgrade guide for these beta versions. I'm still fairly new to all of this. Did I miss an obvious readme somewhere?
Sorry, I updated my comment with the correct import and the blog post.
Thank you very much for your prompt response. I will investigate and update now.
I have created new Ionic 3 application using below
Ionic CLI Version: 4.9.0
$ ionic start Ionic3Project blank --type ionic-angular
Then I followed steps for app version plugin:
https://ionicframework.com/docs/v3/native/app-version/
But facing this issue in app.module.ts
"_[ts]
Type 'AppVersionOriginal' is not assignable to type 'Provider'.
Type 'AppVersionOriginal' is missing the following properties from type 'FactoryProvider': provide, useFactory [2322]_"
ipsjolly... You created an ionic 4 project not 3 that is why you facing problems
@realSanele the application created was in Ionic3 as I have added --type ionic-angular which creates app in version 3. But my problem is resolved now :+1:
You need to install npm plugin using an older version
I have explained my issue and solution here if anybody else faces similar issues. thanks
Most helpful comment
You have to change your imports to "import { Geolocation } from '@ionic-native/splashscreen/ngx'" and so on (Read more here: https://blog.ionicframework.com/help-test-ionic-native-5/)
If you still have problems you can use ionic native v4 together with "rxjs-compat".