gpt4 book ai didi

node.js - 使用 firebase-admin 的云函数中 @firebase/database 的错误对等依赖关系

转载 作者:太空宇宙 更新时间:2023-11-03 23:14:18 25 4
gpt4 key购买 nike

我有一些使用 firebase-admin 包的函数。

我不知 Prop 体是什么时候,但在某个时候我开始收到一些 npm 警告:

npm WARN @firebase/database@0.4.12 requires a peer of @firebase/app@0.x but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/database@0.4.12 requires a peer of @firebase/app-types@0.x but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/database-types@0.4.2 requires a peer of @firebase/app-types@0.x but none is installed. You must install peer dependencies yourself.

因此,在 firebase-adminpackage.json 文件中,有:

"dependencies": {
"@firebase/database": "^0.4.7",
"@google-cloud/firestore": "^2.0.0",
"@google-cloud/storage": "^3.0.2",
"@types/node": "^8.0.53",
"dicer": "^0.3.0",
"jsonwebtoken": "8.1.0",
"node-forge": "0.7.4"
},

@firebase/databasepackage.json中,有:

"peerDependencies": {
"@firebase/app": "0.x",
"@firebase/app-types": "0.x"
},

但是当我访问他们的 NPM 页面时:

https://www.npmjs.com/package/@firebase/app https://www.npmjs.com/package/@firebase/app-types

我看到这个:

This package is not intended for direct usage, and should only be used via the officially supported firebase package.

问题:

我是否应该安装它们?

最佳答案

这是一个已知问题,将在未来版本的 JS SDK 中修复:https://github.com/firebase/firebase-js-sdk/pull/2082

忽略警告是安全的。

关于node.js - 使用 firebase-admin 的云函数中 @firebase/database 的错误对等依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57512109/

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