Cordova-plugin-firebase: Ionic - Cannot find module '@ionic-native/firebase'

Created on 11 Apr 2018  ·  3Comments  ·  Source: arnesson/cordova-plugin-firebase

This happens only with this native plugin for Ionic.
Shows me this error: Cannot find module '@ ionic-native/firebase' after installing this way:

$ ionic cordova plugin add cordova-plugin-firebase
$ npm install --save @ ionic-native/firebase

import { Firebase } from '@ ionic-native/firebase';
import { Component } from '@ angular/core';
import { NavController } from 'ionic-angular';

@ Component({ 
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  constructor(public navCtrl: NavController,
    private firebase: Firebase) {

  } 

}

My ionic cordova plugin --list:

cordova-plugin-device 2.0.1 “Device”
cordova-plugin-firebase 0.1.25 “Google Firebase Plugin”
cordova-plugin-ionic-keyboard 2.0.5 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 1.2.0 “cordova-plugin-ionic-webview”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-whitelist 1.3.3 “Whitelist”

Most helpful comment

As @DanielAccorsi said, You need to install the Ionic Native Wrapper for this plugin.

Checkout the Ionic Documentation here:

All 3 comments

To solve the problem, I needed to put this line in package.json:
"@ ionic-native/firebase": "4.7.0",

Maybe the install script needs to put this, right?

As @DanielAccorsi said, You need to install the Ionic Native Wrapper for this plugin.

Checkout the Ionic Documentation here:

closing an non-actionable

Was this page helpful?
0 / 5 - 0 ratings