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:

Asked
Modified
5 years, 10 months ago
Viewed
209 times
Part
of Mobile Development and Google Cloud Collectives
-
1Please include the error as textSimon Crane– Simon Crane2020-01-25 11:41:43 +00:00Commented Jan 25, 2020 at 11:41
Add a comment
|
1 Answer
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 namesyntax 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!