Firebase Native Is Conflicting With Firebase JS In Ionic3 App ( Push Notifications Enabling Issue)
I want to use firebase chatting with push notifications. I purchased a code sample for this and no plugin conflict is there in that piece of code. I am having a plugin conflict of Firebase native with a red line below. I am attaching a screenshot of the code
I tried removing the node_modules folder. Remove platform Android. Adding it again. running command npm I for installing node_modules folder again. The problem remains the same
Push notifications should work. Right now messaging is working perfect but when I try to enable push notifications the plugin conflict comes in
import { Firebase } from '@ionic-native/firebase';
import { AngularFirestore } from 'angularfire2/firestore';
import { UserProvider } from '../../providers/user/user';
import firebase from 'firebase';
import { config } from '../../app/app.angularfireconfig'
@Injectable()
export class FcmProvider {
userId;
fireuserStatus = firebase.database().ref('/userstatus');
constructor(
public userservice: UserProvider,
private http: Http,
public afs: AngularFirestore,
public firebaseNative: Firebase
) {
}
Answer
Finally I solved it myself. I am answering it lets hope it helps someone. Just downgrade the Firebase plugin to version 4.20.0. It won't ask you for adding /ngx at the end and you can use firebase by staying in ionic3
ionic cordova plugin add cordova-plugin-firebase npm install @ionic-native/[email protected]
Run these commands and your problem will be solved.
Related Questions
- → How can I query Firebase for an equalTo boolean parameter?
- → How can I access nested data in Firebase with React?
- → Firebase simple blog (confused with security rules)
- → Removing item in Firebase with React, re-render returns item undefined
- → AngularJS Unknown Provider Error (Firebase & AngularFire)
- → How do you pass top level component state down to Routes using react-router?
- → "this" is null in firebase query function in reactjs
- → Angular Module Failed to Load
- → Multiple dex files define Lcom/google/android/gms/internal/zzrx;
- → Joining Firebase tables in React
- → How can I make add firepad to my reactjs project?
- → How to use Cloud Functions for Firebase to prerender pages for SEO?
- → React.js component has null state?