FirebaseExtended / reactfire

Hooks, Context Providers, and Components that make it easy to interact with Firebase.
https://firebaseopensource.com/projects/firebaseextended/reactfire/
MIT License
3.54k stars 405 forks source link

Error when installing reactfire@exp #425

Closed santuy-co closed 3 years ago

santuy-co commented 3 years ago

I get error below then running npm install --save reactfire@exp firebase@exp:

lod@lamualfa-com:~/repositories/github/santuy/santuy$ npm install --save reactfire@exp firebase@exp
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: santuy@0.1.0
npm ERR! Found: firebase@9.0.0-beta.8
npm ERR! node_modules/firebase
npm ERR!   firebase@"9.0.0-beta.8" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer firebase@"9.0.0-2021720181311" from reactfire@4.0.0-exp.0e1a7fe
npm ERR! node_modules/reactfire
npm ERR!   reactfire@"4.0.0-exp.0e1a7fe" 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.
npm ERR! 
npm ERR! See /home/lod/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/lod/.npm/_logs/2021-08-25T06_04_52_982Z-debug.log

My package.json file:

{
  "name": "santuy",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@headlessui/react": "^1.4.0",
    "@moxy/next-layout": "^2.2.3",
    "next": "11.1.0",
    "react": "17.0.2",
    "react-dom": "17.0.2"
  },
  "devDependencies": {
    "@types/react": "17.0.18",
    "autoprefixer": "^10.3.1",
    "eslint": "7.32.0",
    "eslint-config-next": "11.1.0",
    "postcss": "^8.3.6",
    "tailwindcss": "^2.2.7",
    "typescript": "4.3.5"
  }
}

I have tried to remove node_modules & package-lock.json, but the error still occurs. How i can do to fix it?

epodol commented 3 years ago

Try running this command to install firebase first:

npm i firebase@9.0.0-2021720181311

Then install reactfire:

npm i reactfire@exp

Once a release candidate or another beta version is released, reactfire will probably update to be more flexible about firebase versions.