FirebaseExtended / reactfire

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

Could not resolve "@firebase/app" #477

Closed KaiSpencer closed 2 years ago

KaiSpencer commented 2 years ago

Im having issue setting this up with Vite and Yarn 3

Version info

React: 17.0.0

Firebase: 9.1.2

ReactFire: 4.2.0

Other (e.g. Node, browser, operating system) (if applicable): vite: 2.6.4 vitejs/plugin-react: 1.0.0 yarn: 3.0.2

Steps to reproduce

Scaffold Vite React app, follow quickstart, yarn dev

Expected behavior

Add FirebaseAppProvider to App with no build errors.

Actual behavior

 > .yarn/cache/@firebase-database-npm-0.12.1-77d99a60e5-3114e635c7.zip/node_modules/@firebase/database/dist/index.esm2017.js:1:104: error: Could not resolve "@firebase/app" (mark it as external to exclude it from the bundle)
    1 │ import { getApp, _getProvider, SDK_VERSION as SDK_VERSION$1, _registerComponent, registerVersion } from '@firebase/app';

Screenshot 2021-10-14 at 21 44 57

jhuleatt commented 2 years ago

Hi @KaiSpencer, I just tried to reproduce this with:

And didn't get that error. Do you still get the error with the latest version of these libraries?

akarabach commented 2 years ago

the same error for me

jhuleatt commented 2 years ago

@akarabach are you using the latest version of these libraries?

jhuleatt commented 2 years ago

Closing due to inactivity. If anyone else encounters this, please file a new issue and include a sample that reproduces this issue.