-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
YellowBoxList Error when starting: TypeError: undefined is not an object (evaluating 'props.getItem') #21154
Comments
It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists. The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running |
0.57 ,same error occur |
I'm getting the same error. has anyone found the solution to resolve this issue? |
Similar issue with
and right now I usually run the application in Debug Js Remotely active which transfer to the YellowBox warning to the React-Native debugger |
I wasn't able to track down the exact cause, but I was seeing this issue (as well as #20405) when using |
got the same error +1 |
@mikemorris This is a nice catch. I use the following at my babelrc file.
|
I also had this issue. Apparently "@babel/plugin-proposal-class-properties" has a bug and since I didn't really need it, I just removed it from my babelrc. |
This same error occurred with me. I'm currently in And after three attempts, what worked for me was running these following commands (the old "bread-and-butter" way):
In my case, I faced this issue after I included new libraries using Unfortunately it isn't an easy to grasp flow for why my build failed, and why it suddenly worked after three attempts resetting the configuration. This might not work for you as well, I'm giving it out as a "possible solution" that might help you out, as it was annoying for me. |
I'm facing this same issue with 0.57.4. Tried what @gglee89 suggested and still no luck. |
0.57.4 Is there any solution |
Still there in 0.57.5. Try a |
After 3 days lost of this BS - removing |
Im stuggeling with this now, but dont have any plugin proposal class properties in any of my files. |
This was a fix that solved it for me. I dont like it but works for now. |
update js core for android and remove @babel/plugin-proposal-class-properties, it's seem no need to add this plugin for latest jsc |
I ran into this trouble as well while upgrading expo to version 31. It's become resolved after I updated react-native-scripts to version 2 and changed the main field in package.json to ./node_modules/expo/AppEntry.js. I'm also using babel-preset-expo@5 as my devDependency instead of any other babel dependency. |
The JSC in Android was updated in December, it's in master. The new JSC will be part of the 0.59 release. |
mobx babel-plugin also will make this mistake! |
in addition to canastro's resolution, the one in the link tot he babel discussion of the bug lists another: put @babel/plugin-transform-flow-strip-types before @babel/plugin-proposal-class-properties .. this worked for me |
My initial configuration was: I spent two days trying to solve the issue. What finally worked was: added the key id to the mapper I didn't know that was necessary that key identifier on RN also . Hope this help someone. Final package.json config "dependencies": { |
i'm getting this error, not on yellowbox, but in a FlatList in a component. this showed up after some changes to my build, first in IOS and now in android. the last thing i added to my project is: |
My case was similar, and the problem was that somehow, the babel dependencies, version and babel.config was not correct. As I posted, I had to upgrade babel again and worked out. I spend days trying to solve it. Some RN versions are very.... |
THANKS. updating babel config removed this issue for me. |
I just want to add something, This fails:
but this works:
|
@robbiemu I don't know how you figured it out, but adding For others encountering this issue, I believe thus far -- this is the best solution (vs removing |
|
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
Memory: 3.81 GB / 24.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.12.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
Android SDK:
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2
API Levels: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
@types/react: ^16.4.14 => 16.4.14
@types/react-native: ^0.56.19 => 0.56.19
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-asset: 1.1.2
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
With warning boxes in starting, the app pops up with red error page with Flatlist's props checking error.
Unhandled JS Exception: TypeError: Cannot read property 'getItem' of undefined
This error is located at:
in FlatList (at YellowBoxList.js:87)
in RCTView (at View.js:44)
in YellowBoxList (at YellowBox.js:104)
in YellowBox (at AppContainer.js:93)
in RCTView (at View.js:44)
in AppContainer (at renderApplication.js:33)
Reproducible Demo
app_react.zip
The text was updated successfully, but these errors were encountered: