Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

360
Views
Giving Error : Attempting to change the getter of an unconfigurable property in React native

I am working on the project in react-native but this is throwing an error

Attempting to change the getter of an unconfigurable property

import * as React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import 'react-native-gesture-handler';
import { createStackNavigator } from '@react-navigation/stack';
import { NavigationContainer } from '@react-navigation/native';
import LogInScreen from './screens/loginScreen';
import SignUpScreen from './screens/singupScreen';
import ActivitiesScreen from './screens/activitiesScreen';
import StackNavigator from './navigation/WelcomeStackNavigation';
import StackNavigator2 from './navigation/Stack2';
import { AppLoading } from 'expo';
import { createAppContainer, createSwitchNavigator } from 'react-navigation';


function App() {
  return (
    <NavigationContainer>
      
    </NavigationContainer>
  );
}

export default App;

When you remove the code snippet which is 'import { createAppContainer, createSwitchNavigator } from 'react-navigation';' Then, the error will not show. If you insert that again the error will be showing.

You can check the package.json file:

{
  "dependencies": {
    "firebase": "7.9.0",
    "react-is": "^16.8.0",
    "expo-font": "~8.4.0",
    "@firebase/app": "0.x.0",
    "styled-system": "*",
    "react-native-svg": "12.1.0",
    "react-navigation": "4.4.1",
    "styled-components": "*",
    "@firebase/app-types": "0.x.0",
    "@firebase/firestore": "*",
    "react-native-screens": "~2.15.2",
    "@react-navigation/stack": "^5.14.4",
    "react-native-reanimated": "~1.13.0",
    "@react-navigation/native": "^5.9.4",
    "react-native-size-matters": "*",
    "react-native-gesture-handler": "~1.8.0",
    "react-native-safe-area-context": "3.1.9",
    "react-native-floating-label-input": "*",
    "@react-native-community/masked-view": "0.1.10"
  }
}

I am confused.

You can check this snack

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You mix up @react-navigation/native and react-navigation.

Change your import as below:

import { createAppContainer, createSwitchNavigator } from '@react-navigation/native';
about 4 years ago · Juan Pablo Isaza Report

0

I was getting same error. I just changed to expo version 43 on snack and then extracted the file on VSC, and it worked.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!