gpt4 book ai didi

angular - node_modules/@angular/fire/firebase.app.module.d.ts 中的错误?

转载 作者:行者123 更新时间:2023-12-03 15:30:28 24 4
gpt4 key购买 nike

编译器完成后出现此错误。我尝试卸载并重新安装 firebase @angular/fire 但无法修复。我对错误感到困惑。我找不到它的解决方案

"@angular/cli": "~10.2.0",
"firebase": "^8.0.0",
"@angular/fire": "^6.0.3",

ERROR in node_modules/@angular/fire/firebase.app.module.d.ts:2:10 - error TS2614: Module '"../../firebase"' has no exported member 'analytics'. Did you mean to use 'import analytics from "../../firebase"' instead?

2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app';
~~~~~~~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:21 - error TS2614: Module '"../../firebase"' has no exported member 'app'. Did you mean to use 'import app from "../../firebase"' instead?

2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app';
~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:26 - error TS2614: Module '"../../firebase"' has no exported member 'auth'. Did you mean to use 'import
auth from "../../firebase"' instead?

2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app';
~~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:32 - error TS2614: Module '"../../firebase"' has no exported member 'database'. Did you mean to use 'import database from "../../firebase"' instead?

2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app';
~~~~~~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:42 - error TS2614: Module '"../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../firebase"' instead?

2 import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app';

node_modules/@angular/fire/firestore/document/document.d.ts:5:10 - error TS2614: Module '"../../../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../../../firebase"' instead?

5 import { firestore } from 'firebase/app';
~~~~~~~~~
node_modules/@angular/fire/firestore/collection-group/collection-group.d.ts:2:10 - error TS2614: Module '"../../../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../../../firebase"' instead?

2 import { firestore } from 'firebase/app';
~~~~~~~~~
node_modules/@angular/fire/firestore/firestore.d.ts:8:10 - error TS2614: Module '"../../../firebase"' has no exported member 'firestore'. Did you mean to use
'import firestore from "../../../firebase"' instead?

8 import { firestore } from 'firebase/app';

我希望我得到好的回应。

最佳答案

不知道为什么这个问题被否决了。 @Muhammad Mehdi 的担忧是有道理的。我刚刚遇到了同样的问题。
此不兼容问题已在官方 @angular/fire 上标记GitHub 页面 here
建议的解决方法对我有用。简而言之:

  • 卸载您当前的 @angular/fire包 ( npm uninstall @angular/fire )
  • 使用 6.0.4-canary.9a26fbe 安装最新版本( npm i @angular/fire@6.0.4-canary.9a26fbe --save ) ,按照维护者的指示 here
  • 曾经版本6.0.4即将发布(截至今天尚未发布),我们可以切换回最新的官方版本。与此同时,这应该会让你继续前进。
  • 关于angular - node_modules/@angular/fire/firebase.app.module.d.ts 中的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64559103/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com