Yes
yes
Windows 10 ver 15063.540
react-native-cli: 2.0.1
react-native: 0.47.1
node v6.11.2
not using yarn
android-studio ver 2.3.3
(Write your steps here:)
react-native init AwesomeProject
cd AwesomeProject
[standard project directory is found. have been developing for approx 8 days. previous various error types which managed to debug and resolve. This is different.]
react-native run-android
expected standard AwesomeProject to load.
-->
red error screen on android studio android emulator
no additional error info via external debugger.
have tried
npm i -g react-native-git-upgrade
react-native-git-upgrade
and
react-native-git-upgrade v0.47.0
always the same problem.
https://snack.expo.io/SJz9BMSdW
NB: above example with all stylsheet references removed and simplified to most basic hello world.
have checked previous path settings from previous installs were removed priot to reinstalls.
really at a loss here. Don't know what else I can possibly check.
nb: have choco installed, I think previous install did not use choco to install nodejs, uninstall was without using choco.
checked choco uninstall nodejs : said nodejs not installed prior to reinstalling without choco.
just bought a new laptop and really not enjoying this. also wondering if problems are less on a linux based dev environment.
This was happening to me earlier. The following lines solved the problem for me (Windows 10). However, for anyone on OSX, this might require extra work for the same problem. This made me have to install yarn since I didn't have it earlier.
yarn remove babel-preset-react-native
yarn add [email protected]
wow. thanks for the fast answer.
This worked.
Everything is wonderful again.
also: my first issue raised on a large package. achievement unlocked. :)
wow, @bchehraz thank you! I've been staring at a red simulator for about a week now.
@bchehraz Where am I supposed to run the commands? within the project folder or inside node_modules?
P.S. got this fixed from comments in this issue.
Basically, update package.json (set --> "babel-preset-react-native": "2.1.0"). and delete node_modules folder and run the following commands in react-native-project folder:
$ npm install
$ npm start -- --reset-cache
$ react-native run-android
@divyakoshy I actually needed those 3 commands but for a different reason. My ESLint started to tell me my import statements were reserved-- and the "react-native run-android" command stopped working altogether. It was strange.
Anyway, I followed what you said and it fixed my problem. 馃槃
@bchehraz How did you get the ESLint stuff working. Im using webstorm and it is now suffering from amenesia about ES6 after I ran these commands ? Any help will be really appreciated.
@Almjz Give me more details. What's working and what's not working? Are there import statements that are now invalid? Can you still run react-native commands like run-android?
@bchehraz Yes imports statments and anything es 6 is flagged as a warning as reserved word but react native run-ios works okay
@bchehraz thanks for the answer! I'm running on OSX, had to install yarn but it worked. Simulator works perfectly now
Also, for those who don't want to use Yarn. The babel-preset-react-native version by default is 2.0.1. So just upgrade to 2.1.0 and that should fix it also :)
@bchehraz thanks so much for the solutions. It work like a charm!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.
This was hepful for me too. Thank you
Most helpful comment
This was happening to me earlier. The following lines solved the problem for me (Windows 10). However, for anyone on OSX, this might require extra work for the same problem. This made me have to install yarn since I didn't have it earlier.