Can not find module '@ firebase / app-types / private'

0

In my ionic app I have been presenting this error. Can not find module '@ firebase / app-types / private'. It should be noted that I am working with link as a database manager. this is the line of the code where he tells me the error is:

import { FirebaseService } from '@firebase/app-types/private';

this is the database.d.ts file

import { Reference } from './Reference';
import { Repo } from '../core/Repo';
import { FirebaseApp } from '@firebase/app-types';
import { FirebaseService } from '@firebase/app-types/private';
/**
 * Class representing a firebase database.
 * @implements {FirebaseService}
 */
export declare class Database implements FirebaseService {
    private repo_;
    INTERNAL: DatabaseInternals;
    private root_;
    static readonly ServerValue: {
        TIMESTAMP: {
            '.sv': string;
        };
    };
    /**
     * The constructor should not be called by users of our public API.
     * @param {!Repo} repo_
     */
    constructor(repo_: Repo);
    readonly app: FirebaseApp;
    /**
     * Returns a reference to the root or the path specified in opt_pathString.
     * @param {string=} pathString
     * @return {!Reference} Firebase reference.
     */
    ref(pathString?: string): Reference;
    /**
     * Returns a reference to the root or the path specified in url.
     * We throw a exception if the url is not in the same domain as the
     * current repo.
     * @param {string} url
     * @return {!Reference} Firebase reference.
     */
    refFromURL(url: string): Reference;
    /**
     * @param {string} apiName
     */
    private checkDeleted_(apiName);
    goOffline(): void;
    goOnline(): void;
}
export declare class DatabaseInternals {
    database: Database;
    /** @param {!Database} database */
    constructor(database: Database);
    /** @return {Promise<void>} */
    delete(): Promise<void>;
}

I'm working with ionic 3 and using a angularfire2 library I installed it with the following command: npm install angularfire2 firebase --save . It also presents this other error but it is when I give it to save in home.ts it tells me that the subscribe () is not a function I think this derives from the first error that I placed at the beginning

Error: Uncaught (in promise): TypeError: notesService.getNotes(...).subscribe is not a function

this is the home.ts file

import { Component, ViewChild } from '@angular/core';
import { NavController } from 'ionic-angular';
import { NotesService } from '../../services/notes.service';
import { DetailPage } from '../detail/detail';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
     notes = [];
     @ViewChild('myNav') nav: NavController;
  constructor(public navCtrl: NavController, public notesService: NotesService) {
    notesService.getNotes().subscribe(notas => {this.notes=notas;});
  }
  public goToDetail(id) {
    this.navCtrl.push(DetailPage, {id:id});
  }
  public createNote() {
    this.navCtrl.push(DetailPage, {id:0});
  }
}
    
asked by Hugo Martínez 03.01.2018 в 14:51
source

0 answers