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

272
Views
error when trying to build aplication for production

it throws me this error: The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script, when trying to build an application in react for production. I use two files: App.js and firebase.js. These are the imports of the App.js, and the firebase.js file (which contains the firebase access configuration):

App.js:

import React from 'react';
import {auth, db} from './firebase'

import {
  getFirestore,
  collection,
  getDocs,
  onSnapshot,
  addDoc,
  deleteDoc,
  doc,
  getDoc,
  updateDoc
}from 'https://www.gstatic.com/firebasejs/9.8.1/firebase-firestore.js';

import { getAuth, createUserWithEmailAndPassword, onAuthStateChanged,signInWithEmailAndPassword,signOut} from 'https://www.gstatic.com/firebasejs/9.8.1/firebase-auth.js';

firebase.js:

import { initializeApp } from "https://www.gstatic.com/firebasejs/9.8.1/firebase-app.js";

        import {
          getFirestore,
          collection,
          getDocs,
          onSnapshot,
          addDoc,
          deleteDoc,
          doc,
          getDoc,
          updateDoc,
        } from "https://www.gstatic.com/firebasejs/9.8.1/firebase-firestore.js";

import { getAuth, createUserWithEmailAndPassword, onAuthStateChanged,signInWithEmailAndPassword,signOut} from 'https://www.gstatic.com/firebasejs/9.8.1/firebase-auth.js';     

const firebaseConfig = {
//my data

};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
const auth = getAuth(app);
export {auth,db}
about 4 years ago · Juan Pablo Isaza
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!