繁体   English   中英

我的 firebase 项目中的 Auth-compat 'index.d.ts' 错误

[英]Auth-compat 'index.d.ts' error in my firebase project

错误

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";

在我正常的项目中想保存的时候,突然出现这个错误,试了很多方法,换了ts版本什么的,都没有解决办法。

您不需要在 import 语句中使用 type 这个词。 试试这个:

 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";

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM