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

492
Views
cómo exportar const db = firebase.firestore()

¿Cómo puedo exportar e importar la base de datos de firebase? Cuando exporto const db = firebase.firestore(), un error me mostrará este mensaje:

 ERROR in ./src/firebase.js 10:0-32 Module not found: Error: Package path . is not exported from package C:\Users\sapic\OneDrive\Plocha\Revizor\node_modules\firebase (see exports field in C:\Users\sapic\OneDrive\Plocha\Revizor\node_modules\firebase\package.json) Did you mean './firebase'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules, C:\Users\sapic\OneDrive\Plocha\Revizor\node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.

Usando Firestore, React, NPM.

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

0

Por ejemplo

Exportar

 import { initializeApp } from 'firebase/app' import { getFirestore } from 'firebase/firestore' import { getAuth } from 'firebase/auth' const firebaseConfig = { apiKey: process.env.REACT_APP_FIREBASE_API_KEY, authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN, projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID, storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET, messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID, appId: process.env.REACT_APP_FIREBASE_APP_ID, } const firebaseApp = initializeApp(firebaseConfig) export const auth = getAuth(firebaseApp) export const db = getFirestore(firebaseApp)

Importar

 import { auth, db } from '../../app/firebase'
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!