Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
react native e-library app error-failed to resolve dependency 'firebase'

I am in the middle of creating a simple library app. Here, I am trying to use firestore database in firebase console. I am coding this on the expo snack editor. It does not work. here is a screenshot of the error in the snack editor: error

These 2 lines are definitely causing the error:

import firebase from "firebase/compat/app";
import "firebase/compat/firestore";

PS this is the firebase version 9 sdk

this is my package.json in snack editor: package.json

EDIT: I forgot to mention that this exact code on snack is working fine in VS Code locally. to get a working example of code locally: go to this link: https://snack.expo.dev/@rpshende/e-library-app

Then,

  1. Extract the folder
  2. cd to the folder in terminal
  3. run command 'npm install'
  4. then run command 'expo start'(make sure expo cli is installed for this to work!)
  5. when the expo developer tools are fired up, press 'W' on the terminal to open project in a web browser

EDIT: i think this is a problem with the snack editor itself.....

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Firebase v9 is Different

try this

import { initializeApp } from 'firebase/app';
import { getFirestore } from 'firebase/firestore';
import { getAuth, GoogleAuthProvider , signInWithPopup, } from 'firebase/auth';

const firebaseConfig = {
  apiKey: "AIzaTyD2Jp9aB7ycUbW1z8QyPLmD111rHezHcOw",
  authDomain: "delete-project-c7021.firebaseapp.com",
  projectId: "delete-project-c7021",
  storageBucket: "delete-project-c7021.appspot.com",
  messagingSenderId: "688102987186",
  appId: "1:688102987186:web:e27537ggg7abc2b86b982b"
};

const app = initializeApp(firebaseConfig);

export const db = getFirestore(app);
export const auth = getAuth();

about 4 years ago · Juan Pablo Isaza Report

0

As @whitehatcoder says, in the expo bubble editor there are version differences. Firebase should have been on version 8 instead of 9.

I add that you try this { "dependencies": { "firebase": "8.8.1" } }

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!