import auth error

[REQUIRED] Describe your environment

  • Operating System version: Windows 10 (VS Code)
  • Browser version: chrome 87.0.4280.88
  • @angular-devkit/architect : 0.1100.4
  • @angular-devkit/build-angular: 0.1100.4
  • @angular-devkit/core : 11.0.4
  • @angular-devkit/schematics: 11.0.4
  • @angular/fire: 6.1.4
  • @schematics/angular/ 11.0.4
  • @schematics/update / 0.1100.4

[REQUIRED] Describe the problem

  • import auth
    Module ‘”../../../node_modules/firebase”‘ has no exported member ‘auth’. Did you mean to use ‘import auth from “../../../node_modules/firebase”‘ instead?ts(2614)

Steps to reproduce:

image
image

Relevant Code:

https://stackblitz.com/fork/firebase-issue-sandbox

* import { auth } from 'firebase/app';

1 possible answer(s) on “import auth error

  1. Instead of ” import { auth } from ‘firebase/app” –> use ” import firebase from ‘firebase/app’; “
    y enand instead of auth.GoogleAuthProvider() –> use firebase.auth.GoogleAuthProvider()