Cannot run React Native app: "Attempting to change the getter of an unconfigurable property."
See original GitHub issueDescription
I am not able to run the React Native app.
When running I receive the following error:
TypeError: Attempting to change the getter of an unconfigurable property.
defineProperty
[native code]:0
<global>
index.js:4
forEach
[native code]:0
<global>
index.js:4
loadModuleImplementation
require.js:322:6
<global>
actions.js:5
loadModuleImplementation
require.js:322:6
<global>
index.js:3
loadModuleImplementation
require.js:322:6
<global>
index.native.js:16
loadModuleImplementation
require.js:322:6
<global>
index.ios.js:1
loadModuleImplementation
require.js:322:6
guardedLoadModule
require.js:201:45
global code
index.bundle?platform=ios&dev=true&minify=false:279996:4
Current behavior
Cannot run React Native app
Expected Behavior
Should be able to run React Native app
Possible Solution
I have tried cleaning caches, re-cloning repo, different node/npm version, etc. Nothing seems to work.
Steps to reproduce
npm install
react-native run-ios
Environment details
System:
OS: macOS Mojave 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 1.50 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
Yarn: 1.17.3 - ~/.nvm/versions/node/v10.16.3/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29
Build Tools: 28.0.3, 29.0.0
System Images: android-26 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: 20.0.5594570
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
react: 16.9 => 16.9.0
react-native: github:jitsi/react-native#efd2aff5661d75a230e36406b698cfe0ee545be2 => 0.61.5-jitsi.1
npmGlobalPackages:
react-native-cli: 2.0.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Attempting to change the getter of an unconfigurable property ...
When you remove the code snippet which is ' import { createAppContainer, createSwitchNavigator } from 'react-navigation'; ' Then, the error will not show....
Read more >[Solved]-React Native -- Attempting to change the getter of an ...
Coding example for the question React Native -- Attempting to change the getter of an unconfigurable property. (Device)-React Native.
Read more >Troubleshooting | React Navigation
Troubleshooting. This section attempts to outline issues that users frequently encounter when first getting accustomed to using React Navigation.
Read more >TypeError: setting getter-only property "x" - JavaScript | MDN
TypeError: Cannot set property x of #<Object> which has only a getter (V8-based) TypeError: setting getter-only property "x" (Firefox) TypeError: Attempted ...
Read more >attempting to change the getter of an unconfigurable ... - 掘金
attempting to change the getter of an unconfigurable property react native技术、学习、经验文章掘金开发者社区搜索结果。掘金是一个帮助开发者成长的社区 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
try clear the cache
To resolve this I started by trying to get just a blank View to display on the simulator screen. This then helped me find the real issue which was in my index.js
For expo web bear you have to use the registerComponent() function as is already in there. However, for mobile you need to use the regular React Native form:
AppRegistry.registerComponent("AppName", () => App)
This did it for me then I just had to work through some other issues in our codebase.