【问题标题】:NPM error when I am trying to install @nuxtjs/firebase当我尝试安装 @nuxtjs/firebase 时出现 NPM 错误
【发布时间】:2021-11-03 05:53:32
【问题描述】:

我收到了这个我不理解的错误,我真的不知道如何修复...我正在使用 Nuxt.js,我想与它一起使用 firebase,但是当我尝试firebase.nuxtjs.org 并安装 @nuxtjs/firebase 我收到此错误 -

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: **************@1.0.0
npm ERR! Found: firebase@9.0.1
npm ERR! node_modules/firebase
npm ERR!   firebase@"^9.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer firebase@"^8.3.1" from @nuxtjs/firebase@7.6.1
npm ERR! node_modules/@nuxtjs/firebase
npm ERR!   @nuxtjs/firebase@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

我希望你们都可以帮助我。提前谢谢!

【问题讨论】:

  • 兄弟,使用 node 当前版本不是一个好主意,特别是如果你依赖第三方模块

标签: node.js firebase npm firebase-authentication nuxt.js


【解决方案1】:

正如@nuxtjs/firebase 库 (https://github.com/nuxt-community/firebase-module) 的自述文件中所述,目前不支持 firebase 版本 9。使用 firebase@8.10.0 和 @nuxtjs/firebase@7.6.1 应该可以工作。

您可以在此处跟踪 nuxt 下何时支持 firebase 9 的进度:https://github.com/nuxt-community/firebase-module/issues/573

【讨论】: