React-native 在 firebase 导入语句中抛出意外标记。我已经尝试解决这个问题很长时间了。我已经使用 npm i install @react-native-firebase/auth
安装了 @react-native-firebase/auth。请帮忙。
这是错误截图:
最佳答案
这很可能发生,因为您无法像在代码中那样导入。
正如文档所述 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.
如果您需要从库中导出的所有对象,则需要在其中放置一个别名,如下所示:
import * as auth from '@react-native-firebase/auth';
希望对您有所帮助!
关于javascript - React-native 在导入语句上抛出意外的 token 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59908741/