The project has been running well, but suddenly this error appeared, Uncaught SyntaxError: ambiguous indirect export: getFirestore, for unknown reasons
<p>My project uses Firebase as the backend, this is the configuration file: </p>
<pre class="brush:php;toolbar:false;">import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";
import { getFirestore } from "firebase/firestore";
import { getStorage } from "firebase/storage";
const firebaseConfig = {
stuff...
};
const app = initializeApp(firebaseConfig);
export const auth = getAuth(app);
export const db = getFirestore(app);
export const storage = getStorage(app);</pre>
<p>Try using as to rename the function: </p>
<pre class="brush:php;toolbar:false;">import { getFirestore as getFirestoreFunction } from "firebase/firestore";</pre>
<blockquote>
<p>It works for getFirestore</p>
</blockquote>
<blockquote>
<p>Uncaught syntax error: ambiguous indirect export: initializeApp</p>
</blockquote>
<blockquote>
<p>Try the same thing with initializeApp</p>
</blockquote>
<pre class="brush:php;toolbar:false;">import { initializeApp as initFirebaseApp } from "firebase/app";</pre>
<blockquote>
<p>Uncaught syntax error: ambiguous indirect export: initializeApp</p>
</blockquote>
<p>The version here is "firebase": "^8.6.8"</p>