-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloud firestore setup issue with ionic 3.7.1 #182
Comments
Hey @faraazc thanks for your interest in using Cloud Firestore! By default You should be able to modify the code you sent as follows and it should work: import firebase from 'firebase';
import 'firebase/firestore';
var db = firebase.firestore(); Let me know if that works for you. |
Hey. |
I think it is probably an issue w/ your setup. I just tried a clean install and the |
@jshcrowthe Thanks. Now it works after applying your suggestion. should not firebase.firestore be part of main bundle?. it will be good so that we use like other firebase products like database,storage. If there is any limitation in bundling with main, you may proceed to close this issue. for now it works for me with your suggestion |
Glad to hear it works for you @faraazc. We opted to omit the firestore SDK from the main bundle so that users don't have to incur the weight of Firestore in addition to database if they aren't using it. Eventually we would like to push people more towards only using the pieces of the SDK that they actually need and to import them directly i.e. // Import the app directly
import firebase from 'firebase/app';
import 'firebase/firestore';
firebase.firestore()... @dominikstrasser if you can isolate and reproduce your issue please feel free to raise a new issue. |
how you initialize the firebaseapp ?? |
Firebase.initializeApp() is not working i imported too. What should I do? |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Tried using ionic 3.x latest (3.7.1)
Updated firebase js sdk to 4.5.0.
Seeing below errors
ERROR Error: Uncaught (in promise): TypeError: __WEBPACK_IMPORTED_MODULE_2_firebase___default.a.firestore is not a function
TypeError: __WEBPACK_IMPORTED_MODULE_2_firebase___default.a.firestore is not a function
Steps to reproduce:
Relevant Code:
http://jsbin.com/rinilu/edit?js,console
The text was updated successfully, but these errors were encountered: