Skip to content

Version 9 Typings for auth.ProviderId #4853

Closed
@cdcarson

Description

@cdcarson

Describe your environment

  • Operating System version: MacOs 11.2.3
  • Browser version: n/a
  • Firebase SDK version: 9.0.0-beta.1
  • Firebase Product: auth

Bug

There seems to be a problem with the typings in @firebase/auth/dist/auth-exp-public.d.ts. On a freshly created Angular app I'm getting the following error trying to import getAuth:

Error: node_modules/@firebase/auth/dist/auth-exp-public.d.ts:3576:28 - error TS2694: 
Namespace '".../node_modules/@firebase/auth/dist/auth-exp-public".ProviderId' has no exported member 'FIREBASE'.

Steps to reproduce:

  • create an Angular app with ng new
  • import getAuth

Relevant Code:

// app.component.ts
import { Component } from '@angular/core';
import { initializeApp, FirebaseApp } from 'firebase/app';
import { getAuth } from 'firebase/auth';
import { environment } from '../environments/environment';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {

  constructor(
  ) {
    const app: FirebaseApp = initializeApp(environment.firebase);
    console.log(app)
  }

}

Note that if you comment out the getAuth import, the Angular app compiles, and the Firebase app is initialized properly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions