i imported firebase app but sitll got this error
import * as firebase from 'firebase/app';
"export 'firestore' (imported as 'firebase') was not found in 'firebase/app'
"angularfire2": "^5.0.0-rc.8.0",
"firebase": "^5.0.2",
Try to replace it for
import { firebase } from '@firebase/app'
import '@firebase/auth'
I'm assuming that you're trying to load the auth module, if not, you might wanna try these...
import '@firebase/auth' - Firebase Authentication.
import '@firebase/firestore' - The Cloud Firestore Database.
import '@firebase/firestorage' - Firebase Storage.
Alternatively, you can also try to import it all...
import * as firebase from 'firebase';
Although it's not recommended to import everything at once.
@renansigolo I'm also having this warning. To apply your comment, I had to install @ firebase/app, @firebase/auth which was dependencies of "firebase". I have doubt that this is right approach. Is there any related issues you know with importing from firebase/app?
Even though you're able to import the lib as a whole with import * as firebase from 'firebase'; it's recommended to only import the module that you will address.
Normally I create a service for each kind of module and at this service I will handle everything related to it.
So for example, you can create an auth service and import the module with import '@firebase/auth' then when you need to handle any sort of authentication you'll be using the service instead of importing firebase again.
Most helpful comment
Try to replace it for
I'm assuming that you're trying to load the auth module, if not, you might wanna try these...
import '@firebase/auth'- Firebase Authentication.import '@firebase/firestore'- The Cloud Firestore Database.import '@firebase/firestorage'- Firebase Storage.Alternatively, you can also try to import it all...
import * as firebase from 'firebase';Although it's not recommended to import everything at once.