Not able to start react native. I am getting the below output when ever i give npm start
Asked
Active
Viewed 327 times
1

Drew Reese
- 165,259
- 14
- 153
- 181

Meenakshi Ruby
- 19
- 4
-
Are you sure you don't get that *and* your application window? – tadman Sep 17 '20 at 07:21
-
i get this output in cmd – Meenakshi Ruby Sep 17 '20 at 07:22
-
When you develop a react-native app, there are 2 things that must run. The first one is the packager which starts every time you run npm start (which is also called by various react-native commands). The second one is the application itself, when you run react-native run-android, your computer compiles native code and installs the apk/ipa into your device/simulator and starts it. You are currently running the packager only. You have to run the application itself too on your device or simulator – Muhammed B. Aydemir Sep 17 '20 at 07:25
-
how do i run the application now? – Meenakshi Ruby Sep 17 '20 at 07:28
-
See https://reactnative.dev/docs/environment-setup – Muhammed B. Aydemir Sep 17 '20 at 07:28
-
If you are on android you have to run "react-native run-android" if you haven't before. So the application gets installed on your device/simulator. Your device/simulator must be connected to your machine and make sure usb debugging is enabled if you use a physical device. Once its installed, you don't need to reinstall it unless you add some native code (java, swift etc.). You can simply open the app while the packager (npm start) is running and continue developing. – Muhammed B. Aydemir Sep 17 '20 at 07:34
-
i have done the environmental setup and trying to run app using expo – Meenakshi Ruby Sep 17 '20 at 08:23
-
please check this link. facing the same issue https://stackoverflow.com/questions/47966887/expo-lan-configuration-doesnt-work-for-new-reactnative-project – Meenakshi Ruby Sep 17 '20 at 08:24
1 Answers
3
It's normal to get this output in the console, running npm start. You should specify what you want to run android or ios by typing:
npm run android
or
npm run ios
to run ios app you should use Mac OS, xcode and simulators should be installed. to run android a real device should be connected to your machine or you can install simulators from AVD manager with android studio
All commands that you can use is declared in the scripts object in package.json

Aymen
- 248
- 3
- 15