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

361
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
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