• Jobs
  • About Us
  • Jobs
    • Home
    • Jobs
    • Courses and challenges
  • Businesses
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

404
Views
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)
over 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Show me some job opportunities
There's an error!