Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

property is not configurable This error is located at: in VirtualizedList (created by FlatList) #48332

Open
manzoorsofi opened this issue Dec 19, 2024 · 4 comments

Comments

@manzoorsofi
Copy link

Description

I am using React Native 0.76, and whenever I try to use a FlatList, the same TypeError: property is not configurable issue arises. This time, I encountered the same error while using the GooglePlacesAutocomplete component, which internally uses FlatList or VirtualizedList to render suggestions.

Steps to reproduce

start React native project version v0.76
try to use Flastlist anywhere

React Native Version

0.76.2

Affected Platforms

Runtime - Android, Runtime - iOS

Output of npx react-native info

PS C:\Users\sofim\Desktop\Spark> npx react-native info
info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.26100
  CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-11300H @ 3.10GHz
  Memory: 9.57 GB / 15.79 GB
Binaries:
  Node:
    version: 18.18.1
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 9.8.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-241.18034.62.2412.12266719
  Visual Studio: Not Found
Languages:
  Java: 17.0.10
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.2
    wanted: 0.76.2
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.76.5 is now available (your project is running on v0.76.2).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.5
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.76.2&to=0.76.5
info For more info, check out "https://reactnative.dev/docs/upgrading?os=windows".

Stacktrace or Logs

property is not configurable This error is located at: in VirtualizedList (created by FlatList)

Reproducer

https://github.com/manzoorsofi/Spark-App-Yashooda

Screenshots and Videos

Screenshot 2024-12-18 145159

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.5. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@mlazari
Copy link
Contributor

mlazari commented Dec 19, 2024

@mlazari
Copy link
Contributor

mlazari commented Dec 22, 2024

This seems to be caused by using loose: false for babel plugins.
A minimal reproducible example would be: https://github.com/mlazari/RN48332Repro/commits/main/
Not sure if it's a bug or it's just React Native not supporting loose: false. I personally don't use loose: false, but maybe there are some dependencies that require it?
@react-native/babel-preset uses loose: true by default: https://github.com/facebook/react-native/blob/v0.76.5/packages/react-native-babel-preset/src/configs/main.js#L25 so this error is visible only when explicitly changing it to use loose: false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants