why my expo doesn't have open ios simulator option - react-native

› Metro waiting on exp://192.168.31.119:19001
› Scan the QR code above with Expo Go (Android) or the Camera app (iOS)
› Press a │ open Android
› Press w │ open web
› Press j │ open debugger
› Press r │ reload app
› Press m │ toggle menu
› Press ? │ show all commands
Logs for your project will appear below. Press Ctrl+C to exit.
Why my expo does not have open IOS simulator option ?

Related

Failed to fully start Android device Emulator on a windows 11 machine to run a react native application

I am building a react-native application and I have been testing the application on an android device simulator. However after running the npm run eject command to stop using the expo-cli; I have failed to run the project/app in my android emulator anymore.
Initially I was opening the android emulator within VSCode but after it failed I tried to open the android emulator in command propmt directly; outside the code editor. Below is the output I received.
INFO | Android emulator version 31.2.7.0 (build_id 8135630) (CL:N/A)
INFO | added library vulkan-1.dll
INFO | configAndStartRenderer: setting vsync to 60 hz
ERROR | Failed to open /qemu.conf, err: 2
WHPX on Windows 10.0.22000 detected.
Windows Hypervisor Platform accelerator is operational
INFO | Started GRPC server at 127.0.0.1:8554, security: Local
INFO | Advertising in: C:\Users\Were\AppData\Local\Temp\avd\running\pid_8104.ini
C:\Users\Were\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: WHPX: Unexpected VP exit code 4
INFO | Shutting down gRPC endpoint
INFO | Shutting down gRPC endpoint
I need someone to help me make sense of the statement/error log so I can be able to run my app in the android emulator again.
[EDIT]
This is the error log i received within VisualStudio Code before trying to open the emulator in command prompt
› Press ? │ show all commands
› Opening on Android...
› Opening emulator My_Pixel_Emulator
Couldn't start project on Android: The emulator (My_Pixel_Emulator) quit before it finished opening. You can try starting the emulator manually from the terminal with: C:\Users\Were\AppData\Local\Android\Sdk/emulator/emulator #My_Pixel_Emulator
› Press ? │ show all commands
C:\Users\Were\Desktop\Demo\DoneWithIt\node_modules\metro-hermes-compiler\src\emhermesc.js:81
throw ex;
^
RuntimeError: abort(Error: could not connect to TCP port 5554: cannot connect to 127.0.0.1:5554: No connection could be made because the target machine actively refused it. (10061)). Build with -s ASSERTIONS=1 for more info.
at process.abort (C:\Users\Were\Desktop\Demo\DoneWithIt\node_modules\metro-hermes-compiler\src\emhermesc.js:796:13)
at process.emit (events.js:315:20)
at process.emit (C:\Users\Were\AppData\Roaming\npm\node_modules\expo-cli\node_modules\source-map-support\source-map-support.js:439:21)
at processPromiseRejections (internal/process/promises.js:245:33)
at processTicksAndRejections (internal/process/task_queues.js:94:32)
error Command failed with exit code 7.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

React Native yarn run ios/android or npm run ios/android not working (Could not get status from Metro bundler)

I've been coding a React Native application by running the app on my android device by doing: yarn start
My app has been ejected from expo but I'm still using expo for development and on a android device and with yarn start it works ok....my problem now is running it on a simulator on my MacBook Pro...
I currently do not have my own ios device and therefore would need to run via the simulator on my MacBook Pro. I try to run the react native app via the simulator via: yarn run ios
However when I run that the simulator does not start and I get the following error:
yarn run v1.3.2
$ expo start --ios
┌─────────────────────────────────────────────────────────────────────────┐
│ │
│ There is a new version of expo-cli available (3.18.4). │
│ You are currently using expo-cli 3.17.10 │
│ Install expo-cli globally using the package manager of your choice; │
│ for example: `npm install -g expo-cli` to get the latest version │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Starting project at /Users/bliss/Documents/Coder/ReactNative/EjectedExpo/JyotishEject
Expo DevTools is running at http://localhost:19002
Could not get status from Metro bundler. connect ECONNREFUSED 127.0.0.1:19001
Connecting to Metro bundler failed.
Set EXPO_DEBUG=true in your env to view the stack trace.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I then tried the android version by running: yarn run android and I get the same error....
how to fix this?
I would like to start working on the ios version asap thru the simulator....
I have now tried running: expo start -c --ios
and I get the following error:
Error running `xcrun simctl openurl booted myapp://127.0.0.1:19000`: An error was encountered processing the command (domain=NSOSStatusErrorDomain, code=-10814):
The operation couldn’t be completed. (OSStatus error -10814.)
Error running app. Have you installed the app already using Xcode? Since you are detached you must build manually. Error: xcrun exited with non-zero code: 194
Your native app is running at myapp://192.168.100.189:19000

getting error "error: unknown option `--nonPersistent" when using expo publish

I have build an app using expo init and it is working perfectly fine with "expo start". But when I wanted to publish it using "expo publish", i get the error.
(base) hemant#hemant-hp:~/Desktop/Chatter-Native$ expo publish
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │
│ There is a new version of expo-cli available (3.11.2). │
│ You are currently using expo-cli 3.2.3 │
│ Install expo-cli globally using the package manager of your choice; for example: `npm install -g expo-cli` to get the latest version │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Unable to find an existing Expo CLI instance for this directory, starting a new one...
error: unknown option `--nonPersistent'
Metro Bundler process exited with code 1
Set EXPO_DEBUG=true in your env to view the stack trace.
(base) hemant#hemant-hp:~/Desktop/Chatter-Native$
maybe it's because you are using a old version of expo-cli, upgrade your expo-cli and try again. you can get a more detailed log of your error runing $export EXPO_DEBUG=true and runing again expo publish

react-native run-ios doesn't show log in react packager

I need some help on the "react-native run-iso". There is no error, but the react packager doesn't show the action log with time. Does anyone know what is wrong? Thanks!
react-native-cli: 2.0.1
react-native: 0.48.3
watchman: 4.9.0
node: v8.5.0
The following is what the packager showed after run the app.
┌────────────────────────────────────────────────────────────────────────────┐
│ Running packager on port 8081. │
│ │
│ Keep this packager running while developing on any JS projects. Feel │
│ free to close this tab and run your own packager instance if you │
│ prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
/Users/panda/PandaApp
React packager ready.
Loading dependency graph, done.
Bundling index.ios.js [development, non-minified, hmr disabled] 100.0% (301/301), done.
If I understand your question correctly, you're trying to view the iOS logs? Did you try to run the command react-native log-ios in a new terminal tab?
Well just in case you are referring to your applications logs you need to access the react native developers tools once you app is opened and the enable remote debugging which would open a new tab on your browser and then there you can open the browser console and see the outputs logs of your application
There is a typo in your log command.
Its react-native log-ios and not react-native log-iso.

React Native cannot find entry file in any of the roots

Description
Cloned a repo to a new computer and getting the following error:
swipes#0.0.1 start C:\a\swipes-api\mobile
node node_modules/react-native/local-cli/cli.js start
Scanning 722 folders for symlinks in C:\a\swipes-api\mobile\node_modules (30ms)
┌────────────────────────────────────────────────────────────────────────────┐
│ Running packager on port 8081. │
│ │
│ Keep this packager running while developing on any JS projects. Feel │
│ free to close this tab and run your own packager instance if you │
│ prefer. │
│ │
│ https://github.com/facebook/react-native │
│ │
└────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
C:\a\swipes-api\mobile
error: bundling: NotFoundError: Cannot find entry file index.android.js in any of the roots: ["C:\\a\\swipes-api\\mobile"]
at DependencyGraph._getAbsolutePath (C:/a/swipes-api/mobile/node_modules/react-native/packager/src/node-haste/DependencyGraph.js:280:11)
at DependencyGraph.getDependencies (C:/a/swipes-api/mobile/node_modules/react-native/packager/src/node-haste/DependencyGraph.js:218:26)
at Resolver.getDependencies (C:/a/swipes-api/mobile/node_modules/react-native/packager/src/Resolver/index.js:107:27)
at C:/a/swipes-api/mobile/node_modules/react-native/packager/src/Bundler/index.js:591:37
at next (native)
at step (C:\a\swipes-api\mobile\node_modules\react-native\packager\src\Bundler\index.js:12:445)
at C:\a\swipes-api\mobile\node_modules\react-native\packager\src\Bundler\index.js:12:605
at process._tickCallback (internal/process/next_tick.js:103:7)
Bundling `index.android.js` 0.0% (0/1), failed.
The path is correct where it's searching from. I've been stuck with this for the whole day now.
Is this somehow because there are double backslashes in the path to the index file?
npm start -- --reset-cache results in the same error.
Running yarn start after react-native run-android results in the same issue as well.
npm run start -- --root C:\a\swipes-api\mobile - No result.
This does not seem to be connected to the previous issue in the RN 0.45.0.
Additional Information
React Native version: 0.45.1
Platform: Android
Development Operating System: Windows
Edit:
All new projects with react-native init result in the same issue. Seems to be an issue with the config of my computer or npm, but I can't seem to track down why this happens.
Any ideas?
I have this and some like this error on windows.
Updating the npm and the node helped me on this issue.
currently i have:
C:\usr\Far>node -v && npm -v
v6.11.1
3.10.10
Many trials to run was not successful at all until I do not update. Anyway some errors like this appear time to time. Just restart. Also helpful to do before restart (but may be not need, just restart):
sh -c 'rm -rf $TMP/react*'
npm cache clean
Where $TMP is your system tmp directory, (check for existence react temp files there)
If you add or update some packages or some like that modifications concerning node_modules directory need to do also:
rm -rf node_modules && npm install