I get an error like the second photo in the application development using reactnative. The file structure is like the first piece of the photo.

Also, the main is app.js and the code is below.

import * as firebase from'firebase';
import {createAppContainer} from'react-navigation';
import {createStackNavigator} from'react-navigation-stack';

import MemoListScreen from'./src/screens/MemoListScreen';
import MemoDetailScreen from'./src/screens/MemoDetailScreen';
import MemoEditScreen from'./src/screens/MemoEditScreen';
import LoginScreen from'./src/screens/LoginScreen';
import SignupScreen from'./src/screens/SignupScreen';

/* eslint-disable */
const firebaseConfig = {
  apiKey: "**************************************:",
  authDomain: "**********************************",
  databaseURL: "**************************************",
  projectId: "**********************************",
  storageBucket: "**********************************",
  messagingSenderId: "**********************************",
  appId: "**************************************",
  measurementId: "********************"
  // So far
const AppNavigator = createStackNavigator({
  Login: {screen: LoginScreen },
  Signup: {screen: SignupScreen },
  Home: {screen: MemoListScreen },
  MemoDetail: {screen: MemoDetailScreen },
  MemoDetail: {screen: MemoDetailScreen },
  MemoEdit: {screen: MemoEditScreen },

}, {
  defaultNavigationOptions: {
    headerBackTitle: null,
    headerStyle: {
    headerTitleStyle: {

export default createAppContainer(App);

The installation of firebase has stopped working, so there is probably a problem there.
What I did was register firebase and run the command npm install --save [email protected]

If anyone knows the cause of the error, please teach me.

  • Answer # 1

    The installation of firebase has stopped working, so there is probably a problem there.

    I wonder if it may not have been installed in the first place?
    Check if you have firebase in package.json

    If not,
    Move to the target PJ with the terminal cd command, and then
    Please try installing firebase again by referring to the following

    npm install -g firebase-tools