I have a table that is being populated by firebase database values. When I launch the application, I obtain the following error: Uncaught SyntaxError SyntaxError: The requested module ‘https://www.gstatic.com/firebasejs/9.8.3/firebase-app.js’ does not provide an export named ‘child’ at (program) Can someone provide a solution HTML and JS code Answer You’re trying to import the Realtime Database functions from the wrong SDK.
Tag: firebase
React / Stripe / createPortalLink() with firebase v9
I’m using Stripe extension for Firebase with firebase functions. Since I refactored a bit my code for firebase v9 modular SDK, I’m getting the following console error with my Stripe createPortalLink() function: Here is my function: Can anyone please advise? Thanks Answer You need to use the getFunctions() and httpsCallable() functions in the new Modular SDK as shown below: Checkout
TypeError: can’t access property “indexOf”, n is undefined
I want to get a doc from firebase on page render, which I do get first(following a button), but after I refresh the page I get this error: My code is: when it works fine I go to the page clicking this div: but now if I refresh, i get the above error. Rest of the code here: fbconfig.js: I
Node js Engine not upgrading for firebase function node compatibility
First failed Here is the package.json Error: package.json in functions directory has an engines field which is unsupported. Valid choices are: {“node”: 10|12|14|16} Deploys to runtimes below Node.js 10 are now disabled in the Firebase CLI. Existing Node.js 8 functions will stop executing at a future date. Update existing functions to Node.js 10 or greater as soon as possible. I
JS Firebase Database Error db.ref is not a function
Hi I am trying to implement firebase realtime database API in my website, I am following this documentation: https://firebase.google.com/docs/database/admin/save-data#node.js but I get this error: this is my code: What am I doing wrong? Could the version I am using be incorrect? Answer You’re mixing the new modular/v9 syntax of the API with the older namespaced syntax, and that won’t work.
Unable to batch.delete documents of a subcollection
I have a collection called display and each document inside the display has a subcollection called history. There’s no error, though, it does not delete the documents in Firestore. After selecting the row to be deleted, it is gone when you click delete. However, once you reload the screen, the data deleted was still there, meaning it wasn’t successfully deleted
Node.js: The registration token is not a valid FCM registration token
I am developing a Flutter mobile app. From my Nodejs backend, I am trying to send FCM Notifications to the app. I downloaded the private key file from firebase console’s project settings. Below is my Nodejs code. Below is the content in my service-account.json file In my Flutter app, below is how I get the FCM Token. When I run
getDoc values Firebase React
This should honestly be the simplest thing. I’ve got a UserPage in my React project. The job is simple, to see and edit values in firebase. Ive got the edit portion working but the read isn’t returning any values. as you can see I’ve got a collection called “users”. Within the collection, each doc is named the ID of the
Firebase: authenticated and guest clients connecting to same Firestore Database
My use case is, I have a web app in which I listen to Firestore collections. One of the collections are for public users where anonymous auth is enough. And the second collection is for logged in users, so I implemented custom token auth following this. https://firebase.google.com/docs/auth/web/custom-auth. Once a user logs in, we start a Web Worker to initialise app
Could not find/install babel plugin ‘proposal-decorators’ on CodeSandbox with Firebase
I’m trying to use Codesandbox in React project, but I’m stuck with error: Could not find/install babel plugin ‘proposal-decorators’: Cannot find plugin ‘proposal-decorators’ or ‘babel-plugin-proposal-decorators’. Error happens when I adding firebase utility in the project. On my local machine everythings fine. Here is my code: https://codesandbox.io/s/eloquent-sun-r1bcqv I tried to: Install babel/plugin-proposal-decorators and add “@babel/plugin-proposal-decorators”: “7.18.2” in dependencies of package.json Install