Reputation: 25
React-native is throwing an unexpected token in a firebase import statement. I have been trying to fix this for a long time. I have already installed @react-native-firebase/auth with npm i install @react-native-firebase/auth
. Please help.
This is the error screenshot:
Upvotes: 0
Views: 206
Reputation: 15166
This is most probably happening because you cannot import as you did in your code.
As the documentation states for import
:
The export parameters specify individual named exports, while the
import * as name
syntax imports all of them. Below are examples to clarify the syntax.
You need to put there an alias, if you need all of the exported objects from a library as the following:
import * as auth from '@react-native-firebase/auth';
I hope that helps!
Upvotes: 1