Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

488
Visualizações
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 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda