I am getting this error while using firestore in typescript -
exports is not defined
ReferenceError: exports is not defined
at eval (/node_modules/#firebase/firestore/dist/index.node.cjs.js?v=470e9090:5:23)
at instantiateModule (C:\Users\ADMIN\Desktop\game-store\node_modules\vite\dist\node\chunks\dep-713b45e1.js:66472:15)
I am using it with svelte kit.
I am following the docs on the firebase website and I think this error comes in getFirestore in onMount. this error happens sometimes and sometimes not.
Please help how to solve it!
I suspect there is a possible solution to your issue in a GitHub discussion I’ve found. They talk about incompatibility between firebase and svelte, but at the end someone commented this was an error caused by the imports. The comment is:
...Looks like when you import "#firebase/app" instead of "firebase/app" it works. Seems like Vite is unable to resolve "firebase/app" to "#firebase/app" because the firebase team said it actually points to "#firebase/app"...
Related
i am trying to use firebase new feature which is App check for flutter app in android emulator.
i am trying to activate the debug provider for android by following this instructions app check .
for line "firebaseAppCheck.installAppCheckProviderFactory(
DebugAppCheckProviderFactory.getInstance());" , i got error message that says The method 'installAppCheckProviderFactory' isn't defined for the type 'FirebaseAppCheck'
does anyone know how to solve this problem
I have run into the same problem myself.
It's not stated on this page but the imports you need are:
import com.google.firebase.FirebaseApp;
import com.google.firebase.appcheck.FirebaseAppCheck;
import com.google.firebase.appcheck.debug.DebugAppCheckProviderFactory;
I've been scouring the internet looking to see if anyone else is hitting this problem, maybe some one else here has seen this recently. I'm integrating Google Play services and using Firebase database with Google Play authentication in a Unity project.
screenshot of autocomplete list with missing class:
For some reason, I seem to have every component of Firebase.Auth except PlayGamesAuthProvider, which is needed to call the GetCredential function. I'm seeing this error:
error CS0234: The type or namespace name 'PlayGamesAuthProvider' does not exist in the namespace 'Firebase.Auth'. Are you missing an assembly reference?
I've reinstalled my Firebase package already and double checked everything for clashing plugins. I'm really hitting a wall here, just curious if anyone else has seen this problem and knows how to get around it. Thanks in advance!
If anyone stumbles across this with the same problem, I've got it working. First tried to reimport the latest Firebase.Auth package from Firebase and that didn't fix the problem. I actually tried doing it a second time, making sure that all files were being re-imported, and then also re-imported the latest GooglePlayGamesPlugin package. I'm not sure which fixed it, but there was clearly something breaking down in there, maybe more-so related to the GooglePlayGamesPlugin. I even disabled/renabled my Unity services. Bottom line, keep reinstalling your stuff and eventually it will work. If I notice anything more specific I'll follow up.
uncaught syntax and reference error
My project is working fine in local host but after firebase deploy redux is not working,please somebody help to solve this
This is primarily comes when the redux.js file is not found or not available in the specified location.
It might happen that you would have excluded the files from your firebase.json during deployment. Please check if you have any ignore rules in firebase.json.
here's my website code snippet :
const provider = new firebase.auth.GoogleAuthProvider();
app.auth().signInWithRedirect(provider);
also tried
signInWithPopup(provider)
both results the same (signInWithPopup shows popup which immediately closes).
I get the same console error :
Uncaught TypeError: this.Zb.he is not a function
at Gg.toString (auth.js:136)
at Mg (auth.js:141)
at auth.js:140
at e.Da (auth.js:39)
at hd (auth.js:43)
at dd (auth.js:43)
at C.Zd (auth.js:42)
at Oc (auth.js:36)
this used to work fine until few days ago.
tried different browsers , same result.
also tried rolling back firebase npm version to 6.6.4
any help will be appreciated.
Eventually it was due to our project structure.
We used 2 different firebase js package versions so probably obfuscation was different between the two.
solved with some webpack configurations.
Thanks.
I have been having a heck of a time getting es6 promises to work with Typescript in a ASP.NET 5 project. I installed the es6-promise.d.ts via tsd install es6-promise. However, I get errors about Promise being duplicated. When I hover on the Promise declaration in the es6-promise.d.ts file, I get the error below (see the blue section ac the bottom of the image). It seems to be conflicting with some typescript definition file from a Microsoft SDK, which is obviously not part of my project.
Does anyone have an idea on why this might be happening or how I can fix this?
What version of TypeScript are you using?
Promise is declared in lib.es6.d.ts.
Check your --target option for tsc. If it is equal to es6 then I think you reference the promise definition twice because one is part of tsc compiler.