Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
323 views
in Technique[技术] by (71.8m points)

react native - Does anyone know what this error means with firebase: "_firebase.default.firestore is not a function."?

This is the error message:

_firebase.default.firestore is not a function. (In '_firebase.default.firestore()', _firebase.default.firestore' is 
undefined)
* http://packager.eq-f54.anonymous.instaclone.exp.direct/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false&minify=false:197513:33 in <unknown>
- node_modulescolor-convertconversions.js:142:18 in convert.rgb.hwb
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:15688:12 in commitLifeCycles
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:18744:22 in commitLayoutEffects
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:265:4 in invokeGuardedCallbackImpl
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:476:2 in invokeGuardedCallback
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:18483:29 in commitRootImpl 
* [native code]:null in commitRootImpl
- node_modulesschedulercjsscheduler.development.js:653:23 in unstable_runWithPriority
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:18317:17 in commitRoot     
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:17697:12 in performSyncWorkOnRoot
* [native code]:null in performSyncWorkOnRoot
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:5321:31 in runWithPriority$argument_1
- node_modulesschedulercjsscheduler.development.js:653:23 in unstable_runWithPriority
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:5316:21 in flushSyncCallbackQueueImpl
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:5304:28 in flushSyncCallbackQueue
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:17125:30 in scheduleUpdateOnFiber
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:7267:16 in classComponentUpdater.enqueueSetState
- node_modules
eactcjs
eact.development.js:471:2 in Component.prototype.setState
* App.js:44:13 in firebase.auth.onAuthStateChanged$argument_0
- [email protected]:1024:12 in Sha1.prototype.compress_
- [email protected]:1141:20 in Sha1.prototype.update
- node_modules
eact-native
ode_modulespromisesetimmediatecore.js:37:13 in tryCallOne
- node_modules
eact-native
ode_modulespromisesetimmediatecore.js:123:24 in setImmediate$argument_0
- node_modules
eact-nativeLibrariesCoreTimersJSTimers.js:130:14 in _callTimer
- node_modules
eact-nativeLibrariesCoreTimersJSTimers.js:181:14 in _callImmediatesPass
- node_modules
eact-nativeLibrariesCoreTimersJSTimers.js:441:30 in callImmediates
- node_modules
eact-nativeLibrariesBatchedBridgeMessageQueue.js:387:6 in __callImmediates
- node_modules
eact-nativeLibrariesBatchedBridgeMessageQueue.js:135:6 in __guard$argument_0
- node_modules
eact-nativeLibrariesBatchedBridgeMessageQueue.js:364:10 in __guard
- node_modules
eact-nativeLibrariesBatchedBridgeMessageQueue.js:134:4 in flushedQueue
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue

TypeError: _firebase.default.firestore is not a function. (In '_firebase.default.firestore()', '_firebase.default.firestore' is undefined)

This error is located at:
    in Main (created by ConnectFunction)
    in ConnectFunction (at SceneView.tsx:122)
    in StaticContainer
    in StaticContainer (at SceneView.tsx:115)
    in EnsureSingleNavigator (at SceneView.tsx:114)
    in SceneView (at useDescriptors.tsx:153)
    in RCTView (at View.js:34)
    in View (at CardContainer.tsx:245)
    in RCTView (at View.js:34)
    in View (at CardContainer.tsx:244)
    in RCTView (at View.js:34)
    in View (at CardSheet.tsx:33)
    in ForwardRef(CardSheet) (at Card.tsx:573)
    in RCTView (at View.js:34)
    in View (at createAnimatedComponent.js:165)
    in AnimatedComponent (at createAnimatedComponent.js:215)
    in ForwardRef(AnimatedComponentWrapper) (at Card.tsx:555)
    in PanGestureHandler (at GestureHandlerNative.tsx:13)
    in PanGestureHandler (at Card.tsx:549)
    in RCTView (at View.js:34)
    in View (at createAnimatedComponent.js:165)
    in AnimatedComponent (at createAnimatedComponent.js:215)
    in ForwardRef(AnimatedComponentWrapper) (at Card.tsx:544)
    in RCTView (at View.js:34)
    in View (at Card.tsx:538)
    in Card (at CardContainer.tsx:206)
    in CardContainer (at CardStack.tsx:620)
    in RCTView (at View.js:34)
    in View (at Screens.tsx:84)
    in MaybeScreen (at CardStack.tsx:613)
    in RCTView (at View.js:34)
    in View (at Screens.tsx:54)
    in MaybeScreenContainer (at CardStack.tsx:495)
    in CardStack (at StackView.tsx:462)
    in KeyboardManager (at StackView.tsx:458)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:74)
    in SafeAreaProvider (at SafeAreaProviderCompat.tsx:42)
    in SafeAreaProviderCompat (at StackView.tsx:455)
    in RCTView (at View.js:34)
    in View (at StackView.tsx:454)
    in StackView (at createStackNavigator.tsx:87)
    in StackNavigator (at App.js:88)
    in EnsureSingleNavigator (at BaseNavigationContainer.tsx:409)
    in ForwardRef(BaseNavigationContainer) (at NavigationContainer.tsx:91)
    in ThemeProvider (at NavigationContainer.tsx:90)
    in ForwardRef(NavigationContainer) (at App.js:87)
    in Provider (at App.js:86)
    in App (created by ExpoRoot)
    in ExpoRoot (at renderApplication.js:45)
    in RCTView (at View.js:34)
    in View (at AppContainer.js:106)
    in RCTView (at View.js:34)
    in View (at AppContainer.js:132)
    in AppContainer (at renderApplication.js:39)
- node_modules
eact-nativeLibrariesLogBoxLogBox.js:148:8 in registerError
- node_modules
eact-nativeLibrariesLogBoxLogBox.js:59:8 in errorImpl
- node_modules
eact-nativeLibrariesLogBoxLogBox.js:33:4 in console.error
- node_modulesexpouildenvironment
eact-native-logs.fx.js:27:4 in error
- node_modules
eact-nativeLibrariesCoreExceptionsManager.js:104:6 in reportException
- node_modules
eact-nativeLibrariesCoreExceptionsManager.js:171:19 in handleException
- node_modules
eact-nativeLibrariesCoreReactFiberErrorDialog.js:43:2 in showErrorDialog
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:15257:32 in logCapturedError
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:15361:20 in logError
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:16597:12 in update.callback- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:7106:2 in callCallback     
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:7127:20 in commitUpdateQueue
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:15801:25 in commitLifeCycles
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:18744:22 in commitLayoutEffects
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:265:4 in invokeGuardedCallbackImpl
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:476:2 in invokeGuardedCallback
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:18483:29 in commitRootImpl 
* [native code]:null in commitRootImpl
- node_modulesschedulercjsscheduler.development.js:653:23 in unstable_runWithPriority
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:18317:17 in commitRoot     
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:17697:12 in performSyncWorkOnRoot
* [native code]:null in performSyncWorkOnRoot
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:5321:31 in runWithPriority$argument_1
- node_modulesschedulercjsscheduler.development.js:653:23 in unstable_runWithPriority
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:5316:21 in flushSyncCallbackQueueImpl
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:5304:28 in flushSyncCallbackQueue
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:17125:30 in scheduleUpdateOnFiber
- node_modules
eact-nativeLibrariesRendererimplementationsReactNativeRenderer-dev.js:7267:16 in classComponentUpdater.enqueueSetState
- node_modules
eactcjs
eact.development.js:471:2 in Component.prototype.setState
* App.js:44:13 in firebase.auth.onAuthStateChanged$argument_0
- [email protected]:1024:12 in Sha1.prototype.compress_
- [email protected]:1141:20 in Sha1.prototype.update
- node_modules
eact-native
ode_modulespromisesetimmediatecore.js:37:13 in tryCallOne
- node_modules
eact-native
ode_modulespromisesetimmediatecore.js:123:24 in setImmediate$argument_0
- node_modules
eact-nativeLibrariesCoreTimersJSTimers.js:130:14 in _callTimer
- node_modules
eact-nativeLibrariesCoreTimersJSTimers.js:181:14 in _callImmediatesPass
- node_modules
eact-nativeLibrariesCoreTimersJSTimers.js:441:30 in callImmediates
- node_modules
eact-nativeLibrariesBatchedBridgeMessageQueue.js:387:6 in __callImmediates
- node_modules
eact-nativeLibrariesBatchedBridgeMessageQueue.js:135:6 in __guard$argument_0
- node_modules
eact-nativeLibrariesBatchedBridgeMessageQueue.js:364:10 in __guard
- node_modules
eact-nativeLibrariesBatchedBridgeMessageQueue.js:134:4 in flushedQueue
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue

I've copied the apiKey:

authDomain: ' ... ',
tabaseURL: ' ... ',
projectId: ' ... ',
storageBucket: ' ... ',
messagingSenderId: ' ... ',
appId: ' ... '

To a separate file called firebaseConfig.js inside a folder called config but this error is appearing now. I've already registered a user on the Authentication and Cloud Firebase, but when I logged in to my react-native expo app again, after creating a new screen inside my app

question from:https://stackoverflow.com/questions/65907593/does-anyone-know-what-this-error-means-with-firebase-firebase-default-firesto

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...