0

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: enter image description here

1
  • 1
    Please include the error as text Commented Jan 25, 2020 at 11:41

1 Answer 1

1

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!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.