• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

394
Vistas
React Native stack navigator Some files doesn't exist error

I am new to React Native. Recently I try to figure out stack navigator. I runned these comments on terminal.

npm install @react-navigation/native npm install react-native-screens react-native-safe-area-context npm install @react-navigation/stack npm install react-native-gesture-handler

here is my code:

import React from "react";
import { StyleSheet, View, Text, AppState } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";

const Stack = createStackNavigator();

function ScreenA(){
  return(
    <View>
      <Text> Screen A</Text>
    </View>
  )
}

function App(){
  return(
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen 
          name="Screen_A"
          component={ScreenA}
        />    
      </Stack.Navigator>
    </NavigationContainer>
  )
}

export default App;

And I get this error message: error

While trying to resolve module @react-navigation/elements from file /Users/ogulcanozen/food/node_modules/@react-navigation/stack/src/views/Header/Header.tsx, the package /Users/ogulcanozen/food/node_modules/@react-navigation/elements/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/ogulcanozen/food/node_modules/@react-navigation/elements/src/index.tsx. Indeed, none of these files exist:

  • /Users/ogulcanozen/food/node_modules/@react-navigation/elements/src/index.tsx(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)
about 3 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda