React Native Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz
Memory: 757.11 MB / 7.93 GB
Binaries:
Yarn: 1.9.4 - C:\Users\ecumb\AppData\Roaming\npm\yarn.CMD
npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.1.0.0 AI-173.4907809

Create RN project using react-native init using version 0.57.0-rc0
react-native run-android
kill the spawned bundler and relaunch using npm start to work around issue #20712
I have this exact error.
Worth mentioning that it's because i'm on 57-rc0 to escape the acessiblity bug in 56
Also worth mentioning that I'm here because 56 is the default configuration in webstorm.
Whats a stable version of react-native I can use to learn things?
I got this too. Replaced babel preset, deleted node_modules/.cache, nothing.
Is this still a problem with rc2 ? because i used to have this issue, but dont with rc2
React Native Environment Info:
System:
OS: Windows 7
CPU: x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
Memory: 1.09 GB / 11.92 GB
Binaries:
Yarn: 1.9.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.1.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 1.5.0.0 AI-141.2456560
I do have this problem with rc2 (on macOS)
@danielgindi can you upload a repro? Just tested locally with the 0.57-branch (details here https://github.com/facebook/react-native/issues/20712#issuecomment-415417949 ) and I can't repro this issue.
rc2 produces the same results on windows
@kelset well, creating a new project using react-native cli, then changing to 0.57.0-rc.2 and the new babel preset, results in a node_modules/react-native/index.js not found.
So I can't even get to that point where the _registerEvents is undefined.
In my own project, I tried to apply the commit for util/Config.js, then delete node_modules/.cache but that did not change anything.
Same problem here on 0.57.0-rc.2 build for android : _registerEvents is undefined
What does the Metro instance output ?
Had same issue on macOS.
I resolved it with running react-native upgrade based on this https://facebook.github.io/react-native/docs/upgrading#alternative
@donjo9 no errors reported on the metro instance just
DELTA [android, dev] ./index.js ββββββββββββββββ 0.0% (0/1)::ffff:127.0.0.1 - - [24/Aug/2018:18:16:37 +0000] "GET /index.delta?platform=android&dev=true&minify=false&deltaBundleId=a4271ccc904b5058 HTTP/1.1" 200 69 "-" "okhttp/3.10.0"
DELTA [android, dev] ./index.js ββββββββββββββββ 100.0% (1/1), done.
Seems like rc-3 solves the issue
I still get the same message on rc-3 :(

Try deleting node_modules/.cache, and then doing react-native start --resetCache
i believe it must be some kind of caching issue, because i had the issue, but can't recreate with any of the rc, not clean install or upgrade from 0.56
@danielgindi react-native start --reset-cache doesn't work :(
And I clean all my cache.
I come from 0.56 version
@tamirrab Maybe it's time to get drastic.
package-lock.jsonnode_modulesnpm ireact-native start --reset-cacheDid it all
plus deleted my app on the emulator
unfortunately the same error :(
steps that i done:
watchman watch-del-all
rm -rf $TMPDIR/react-native-packager-cache-*
rm -rf $TMPDIR/metro-bundler-cache-*
rm -rf node_modules/
npm cache clean
npm cache verify
npm start -- --reset-cache
Still the same error
do you have a repo that produces that error that we could test on?
How can I do it?
I get this Error on the Terminal:
::1 - - [26/Aug/2018:10:15:47 +0000] "GET /index.bundle?platform=ios&dev=true&minify=false HTTP/1.1" 200 - "-" "appName/0.2.8 CFNetwork/901.1 Darwin/18.0.0"
There's one more thing I did before it started working properly, which might not be related to rc.3:
react-native start --projectRoot path/to/project/folder --resetCache
And I used the camelCase arguments specifically.
So it could by either the camel case resetCache, which is even more suspicious because if I recall correctly there has been a commit recently about passing on the resetCache argument,
Or it could be the explicit projectRoot. But now I run it normally.
Same issue here on 0.57.0-rc.3 Windows 10. Like @dmead, I am also attempting to get away from the AccessibilityInfo bug in 0.56 Windows that prevents any apps from working. Attempted solutions proposed by @danielgindi without success, still the exact same error.
@joejordan i will ask you the same question ;) do you have a repository that produces this error, that we could clone and test on :)
Same here....
Upgrade from 0.5.6 because of this issue.
Then here is a new unresolved issue in 0.5.7...
@164738777 same question ;) do you have a repository that produces this error, that we could clone and test on :)
@donjo9 here's one. https://github.com/joejordan/0.57rc3-WindowsCrash
Was able to duplicate the issue on two Windows 10 systems.
Edit: Here's a zip of the full repo including all node modules: https://drive.google.com/open?id=1QeysYZm5-mddwwYSUiwdMt5_M66ojlUq
@joejordan Your .babelrc is wrong. If you have other questions, please try create a new project and make some diff in case you miss something.
It should be:
{
"presets": ["module:metro-react-native-babel-preset"]
}
@gengjiawen that must have been generated by create-react-native-app because I don't think I touched that file. Regardless, I tried it with that preset and the 'undefined' red screen of death still appears upon launch.
Can you try to initial a new project using rc3 ?
@gengjiawen this issue exists in my windows 10 too, can you point on what files to look for, maybe I can give a try. Thanks
check my previous comment, I have not tested it, maybe need more file to change.
I found the following so far:
@joejordan s repo failed on my machine as well, changing the .babelrc and changing the
-"babel-preset-react-native": "5.0.2",
+"metro-react-native-babel-preset": "0.43.5",
in package.json did nothing.
deleting node_modules before doing "yarn" or "npm install" had no effect.
What did work, was initial a new project with rc3 with react-native init albums --version 0.57.0-rc.3 installing that app on my phone with react-native run-android, kill the bundler from the new project, and then running the bundler from the "faulty" project with yarn start or npm run start
By looking at the comments, I suggest you folks wait until the changelog for 0.57 is out, we'll try to have a list of manual steps you have to do to correctly upgrade your projects to 0.57 since a few things are changing.
Again, we are still on RC stage so don't rush into it.
Might as well be the same :D
After my latest post i did a
react-native start --reset-cache
And now i cant seem to recreate the issue, not even with a fresh clone of @joejordan s repo
edit: ok now its back, even in my "working" App, but again a react-native start --reset-cache fixed it
Sorry for keep spamming, but this got me from a clean git clone to a working app
git clone https://github.com/joejordan/0.57rc3-WindowsCrash Test057rc3
cd Test057rc3
npm install
react-native upgrade answering y to every question
Install
platforms;android-27 Android SDK Platform 27
build-tools;27.0.3 Android SDK Build-Tools 27.0.3
with the Android SDK manager
react-native run-android this will still fail
kill bundler
react-native start --reset-cache
From this point on react-native run-android should work
I can also confirm some of @donjo9's process. Here is what got me from a clean git repo to a working app:
react-native init MyApp2 --template typescript --version 0.57.0-rc.3cd MyApp2react-native upgradereact-native run-androidAt this point the bundler booted up, the app installed on the emulator, and I was able to debug via chrome dev tools. I will update this later tonight when I can test on a different computer.
I solved this error by comparing my project to the new 0.57.0 version project and changed some files and reboot my PC
I'm having this issue on any project with 0.57 rc3, starting from scratch or upgrading.
I'm using macOS Mojave beta.
I can confirm that this works with the latest 0.57 rc4:
package.json
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"metro-react-native-babel-preset": "^0.45.1",
.babelrc
"presets": ["module:metro-react-native-babel-preset"]
@pontusab When you say that βthis worksβ, do you mean that you can reproduce the issue or that itβs gone away? I am still seeing this error with 0.57.0-rc.4.
@haggholm had this issue undefined is not a function(evaluating '_this.registerEvents()') on 0.57.0-rc.2 but now with the configuration in .babelrc and 0.57.0-rc.4 it works.
after cache reset (react-native start --reset-cache) it worked for me also
Looks resolved.
I'm still has this issue in 0.57.0-rc.4
There is my package.json
{
...
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"run-ios": "node node_modules/react-native/local-cli/cli.js run-ios --simulator=\"iPhone 7\"",
"test": "jest"
},
"dependencies": {
"core-decorators": "^0.20.0",
"fbemitter": "^2.1.1",
"glamorous-native": "^1.4.0",
"humps": "^2.0.1",
"jshashes": "^1.0.7",
"lodash": "^4.17.4",
"moment": "^2.20.1",
"prop-types": "^15.6.0",
"react": "^16.4.1",
"react-native": "^0.57.0-rc.4",
...
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "^7.0.0",
"babel-eslint": "^8.0.3",
"babel-jest": "22.0.1",
"babel-plugin-module-resolver": "^3.1.1",
"babel-preset-react-native": "^5.0.2",
"eslint": "^4.13.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-import-resolver-babel-module": "^5.0.0-beta.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-jsx-grouped-sort-props": "file:eslint-plugins\\jsx-grouped-sort-props",
"eslint-plugin-react": "^7.5.1",
"jest": "22.0.1",
"react-test-renderer": "16.0.0"
},
"jest": {
"preset": "react-native"
}
}
And the .babelrc
{
...
"presets": ["react-native"],
["@babel/plugin-proposal-decorators", { "legacy": true }]
]
}
@164738777 have you tried this
if so, do you have a repo that reproduces this error that we could try it with ?
Tried rc4 on my Windows 10 machine. Worked fine. Just the following 2 commands.
react-native init MyApp2 --version 0.57.0-rc.4
react-native run-android
Took a while to download a number of packages and finally run on my emulator. Reload works extremely fast compared to 0.55. Waiting for the final .057 release!
Most helpful comment
I have this exact error.
Worth mentioning that it's because i'm on 57-rc0 to escape the acessiblity bug in 56
Also worth mentioning that I'm here because 56 is the default configuration in webstorm.
Whats a stable version of react-native I can use to learn things?