Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

359
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
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 Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda