Home > Net >  Auth-compat 'index.d.ts' error in my firebase project
Auth-compat 'index.d.ts' error in my firebase project

Time:11-25

Error

Error: node_modules/@firebase/auth-compat/dist/auth-compat/index.d.ts:53:421 - error TS1005: ',' expected.

53 import { type User, type Unsubscribe, type ActionCodeInfo, type UserCredential, type Auth, type IdTokenResult, type MultiFactorError, type MultiFactorResolver, type PopupRedirectResolver, type Dependencies, type AuthCredential, type ApplicationVerifier, type ConfirmationResult, type AuthProvider, type MultiFactorUser, type NextOrObserver, type ErrorFn, type CompleteFn, type ActionCodeSettings, type Persistence, type PhoneAuthCredential } from "@firebase/auth";

When I wanted to save in my normal project, this error suddenly appeared, I tried many methods, I changed ts versions or something, but there was no solution.

CodePudding user response:

You don't need the word type in your import statements. Try this instead:

import {
  User,
  Unsubscribe,
  ActionCodeInfo,
  UserCredential,
  Auth,
  IdTokenResult,
  MultiFactorError,
  MultiFactorResolver,
  PopupRedirectResolver,
  Dependencies,
  AuthCredential,
  ApplicationVerifier,
  ConfirmationResult,
  AuthProvider,
  MultiFactorUser,
  NextOrObserver,
  ErrorFn,
  CompleteFn,
  ActionCodeSettings,
  Persistence,
  PhoneAuthCredential,
} from "@firebase/auth";

  • Related