RN Firebase默认的Firebase应用尚未初始化

时间:2018-10-29 20:15:48

标签: react-native react-native-firebase

我无法使用react-native-firebase库将RN应用连接到firebase。

这是库文档的引文:

默认应用是本地预先初始化的,因此无需为默认应用实例调用initializeApp。

但是,应用会抛出此错误:

    The [[DEFAULT]] firebase app has not been initialized!
    app
    C:\Users\yuriy\Desktop\recipe\node_modules\react-native- 
    firebase\dist\utils\apps.js:36:30
    getModule
    C:\Users\yuriy\Desktop\recipe\node_modules\react-native- 
    firebase\dist\utils\apps.js:185:24
    <unknown>
    C:\Users\yuriy\Desktop\recipe\src\screen_editTest.js:15:12
    loadModuleImplementation
 C:\Users\yuriy\Desktop\recipe\node_modules\metro\src\lib\polyfills\require.js:320:6
guardedLoadModule

 C:\Users\yuriy\Desktop\recipe\node_modules\metro\src\lib\polyfills\require.js:214:36
metroRequire
    C:\Users\yuriy\Desktop\recipe\node_modules\metro\src\lib\polyfills\require.js:136:24
<unknown>
    C:\Users\yuriy\Desktop\recipe\App.js:138
loadModuleImplementation
    C:\Users\yuriy\Desktop\recipe\node_modules\metro\src\lib\polyfills\require.js:320:6
guardedLoadModule
    C:\Users\yuriy\Desktop\recipe\node_modules\metro\src\lib\polyfills\require.js:214:36
metroRequire

0 个答案:

没有答案