reactfire icon indicating copy to clipboard operation
reactfire copied to clipboard

Could not resolve "@firebase/app"

Open KaiSpencer opened this issue 4 years ago • 3 comments

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

KaiSpencer avatar Oct 14 '21 20:10 KaiSpencer

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

  • React: 17.0.0
  • Firebase: 9.5.0
  • ReactFire: 4.2.1
  • vite: 2.6.4
  • vitejs/plugin-react: 1.0.0

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

jhuleatt avatar Dec 02 '21 20:12 jhuleatt

the same error for me

akarabach avatar Jan 26 '22 09:01 akarabach

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

jhuleatt avatar Jan 27 '22 19:01 jhuleatt

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

jhuleatt avatar Aug 17 '22 18:08 jhuleatt