Closed Shange-Fagan closed 1 year ago
Unfortunately, I'm unable to see where you define or import firebase
, so I'm unable to help you understand why this is failing. If you can provide this information, I may be able to help you.
However, in the meantime, here are a few links that may be relevant to getting started with Firestore and using Firestore with expo:
Hey @Shange-Fagan. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@Shange-Fagan if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Describe your environment
After adding simple replay button code to my code I get the error TypeError: firebase.firestore is not a function. (In 'firebase.firestore()', 'firebase.firestore' is undefined)]
Steps to reproduce:
install firebase install firebase/firestore add this code to your main.js file:
I have followed all of ChatGPT's instructions but still getting an error message: Chat GPT's instructions: Double-check that you have correctly imported the Firebase Firestore library in your code. The import statement should be similar to import firebase from 'firebase/app'; import 'firebase/firestore'; Ensure that you have initialized the Firebase app before trying to access the Firestore service. Make sure you have the latest version of firebase and firebase-firestore, if you are running an older version of package you might face this kind of error. Double-check that you have correctly set up Firebase and Firestore in the Firebase console and that the configuration information you are using in your code is correct. If you are using a version of Firebase that is not compatible with the latest version of Firebase Firestore, you might face this kind of error. In this case, you should update to the latest version of Firebase. If none of the above steps work, you may need to restart the development server and clear the cache. It is important to double-check your code and the Firebase configuration, and make sure that the Firebase Firestore library is properly imported and initialized before trying to use it.
Relevant Code:
main.js:
firebase.js
package.json