I have trying to run a newly created react-native project with react-native init command when using react-native run-android, it has the issue of starting the js server as the path to user profile "C:\User\Dan" is not recognized. I'm guessing this issue is due to the fact that my profile folder has a spacing of "Dan Tan". But I have no idea how to work around this. It has no issue starting the android emulator right after.
Asked
Active
Viewed 288 times
1
-
are you the same error on react-native start? – Zeeshan Ansari Oct 25 '19 at 11:07
-
@ZeeshanAnsari no errors on react-native start. I get Running Metro Bundler on port 8081 Looking for Js file in c:\rtest\AwesomeProject and Loading dependency graph , done. I believe this is normal. – Nova136 Oct 25 '19 at 14:02
-
So use the react-native start for running server – Zeeshan Ansari Oct 25 '19 at 14:59
-
@ZeeshanAnsari Error persist when i run "start" in a command prompt and "run-android" after in 2 separate cmds . https://imgur.com/a/wuJZlbI i have uploaded screen shot of the error – Nova136 Oct 25 '19 at 15:14
-
cd android && ./gradlew clean && cd ../ && react-native run-android – Zeeshan Ansari Oct 25 '19 at 15:17
-
Please use above command – Zeeshan Ansari Oct 25 '19 at 15:18
-
@ZeeshanAnsari When executing ./gradlew clean , it says '.' is not recognised as a command, am i missing something? – Nova136 Oct 25 '19 at 15:51
-
use without dot "gradlew clean" – Zeeshan Ansari Oct 25 '19 at 15:51
-
@ZeeshanAnsari now it say '/gradlew' is not a recognized command. – Nova136 Oct 26 '19 at 04:07
-
just run gradlew clean – Zeeshan Ansari Oct 26 '19 at 10:11
-
@ZeeshanAnsari gradlew clean worked(modified item). But same existing problem when running ../ followed by react-native run-android after. – Nova136 Oct 26 '19 at 17:07
-
@ZeeshanAnsari I found the fix which was the naming of the user profile. Renamed it and edited registry. At least it runs properly now. thanks for the help – Nova136 Oct 26 '19 at 18:00