Git Product home page Git Product logo

Comments (31)

yetki avatar yetki commented on July 20, 2024 18

I fix my problem with

npx react-native run-android --terminal powershell

however I want to use only npx react-native run-android

from cli.

coder-xiaomo avatar coder-xiaomo commented on July 20, 2024 8

Same here. I upgraded from [email protected] to [email protected], and then, the problem occurred.

I found a temporary solution that is to use npm run start or npm start instead of npm run android mentioned in this stackoverflow page

from cli.

abid-2362 avatar abid-2362 commented on July 20, 2024 7

on MacOS M1 14.2.1 (23C71)

react-native run-android --terminal terminal

worked for me, and then for easy access, I added this under the scripts in package.json file

"android": "react-native run-android --terminal terminal",
"ios": "react-native run-ios --terminal terminal",

and then yarn android works fine

from cli.

james-cohen avatar james-cohen commented on July 20, 2024 4

Sure, I've recorded 2 GIFs below. When I run 'yarn android:test' it is the following npm script:

react-native run-android --active-arch-only --mode=devDebug

The first video, you can see that even after waiting for over a minute, the Android build doesn't start. You have to press a in the Metro terminal but then all of the parameters are lost

metro1

This second video, I run the same script with Metro already running and the Android build starts immediately

metro2

from cli.

phuthien007 avatar phuthien007 commented on July 20, 2024 3

Same issue, trying to solve it.

temporary is run script: npx react-native start and after that type mode a

from cli.

Shreyas-29 avatar Shreyas-29 commented on July 20, 2024 2

Try running the following command:😊

npx react-native start

from cli.

jslok avatar jslok commented on July 20, 2024 2

Getting this bug on windows+android on 0.73.1. Works fine on 0.73.0. Not tested on mac/ios.

from cli.

Navpan18 avatar Navpan18 commented on July 20, 2024 1

Same here. I upgraded from [email protected] to [email protected], and then, the problem occurred.

I found a temporary solution that is to use npm run start or npm start instead of npm run android mentioned in this stackoverflow page

Check if your app works fine in RN 0.72.8

from cli.

james-cohen avatar james-cohen commented on July 20, 2024 1

Hey @Navpan18, @coder-xiaomo can you try passing via --terminal flag a path to executable file of your terminal? and say if that is working :)

This works for me. However it only opens a new window and doesn't automatically run andoid, it acts as if you've run react-native start only

from cli.

rishimagiawala avatar rishimagiawala commented on July 20, 2024 1

Same issue, trying to solve it.

temporary is run script: npx react-native start and after that type mode a

This works for me, thx.

I ran "npx react-native start", then hit "a" when it gave me the option to

from cli.

yetki avatar yetki commented on July 20, 2024 1

however I want to use only npx react-native run-android

you can also do npx react-native run-android --terminal

PS FILE_PATH> npx react-native run-android --terminal
error: option '--terminal ' argument missing

It was asking string like node, powershell etc.

from cli.

Navpan18 avatar Navpan18 commented on July 20, 2024

Facing same issue

from cli.

Navpan18 avatar Navpan18 commented on July 20, 2024

this problem is occuring from react native version 0.72.9

from cli.

Navpan18 avatar Navpan18 commented on July 20, 2024

App works fine till react native version 0.72.8 . Problem begins from 0.72.9

from cli.

szymonrybczak avatar szymonrybczak commented on July 20, 2024

Hey @Navpan18, @coder-xiaomo can you try passing via --terminal flag a path to executable file of your terminal? and say if that is working :)

from cli.

szymonrybczak avatar szymonrybczak commented on July 20, 2024

This works for me. However it only opens a new window and doesn't automatically run andoid, it acts as if you've run react-native start only

Interesting, can you please record a video which presents this behaviour?

from cli.

abbasbphppoets avatar abbasbphppoets commented on July 20, 2024

Sure, I've recorded 2 GIFs below. When I run 'yarn android:test' it is the following npm script:

react-native run-android --active-arch-only --mode=devDebug

The first video, you can see that even after waiting for over a minute, the Android build doesn't start. You have to press a in the Metro terminal but then all of the parameters are lost

metro1 metro1

This second video, I run the same script with Metro already running and the Android build starts immediately

metro2 metro2

doesn't work

from cli.

WesleyMaciel2510 avatar WesleyMaciel2510 commented on July 20, 2024

Same issue, trying to solve it.

from cli.

dezudas avatar dezudas commented on July 20, 2024

+1
$ react-native run-ios --simulator 'iPhone 15'
error Cannot start server in new window because no terminal app was specified.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

from cli.

machadinha avatar machadinha commented on July 20, 2024

When i run "npx react-native start", then hit "a" it gives me this
image
what do i do im in windowns

from cli.

Shreyas-29 avatar Shreyas-29 commented on July 20, 2024

When i run "npx react-native start", then hit "a" it gives me this image what do i do im in windowns

Yes. I am also getting that error.
But don't know how to fix it. I am unable to run the app on neither physical device nor android studio.

from cli.

szymonrybczak avatar szymonrybczak commented on July 20, 2024

@machadinha @Shreyas-29 for you it is not working because you don't have ANDROID_HOME env variable provided - please re-read an error message and try setting in your system setting - also it may be helpful to run npx react-native doctor and make sure it is passing :)

from cli.

szymonrybczak avatar szymonrybczak commented on July 20, 2024

however I want to use only npx react-native run-android

you can also do npx react-native run-android --terminal

from cli.

machadinha avatar machadinha commented on July 20, 2024

@machadinha @Shreyas-29 for you it is not working because you don't have ANDROID_HOME env variable provided - please re-read an error message and try setting in your system setting - also it may be helpful to run npx react-native doctor and make sure it is passing :)

Now when i run it gives me this
image
image
image
image
image
image

from cli.

machadinha avatar machadinha commented on July 20, 2024

@machadinha @Shreyas-29 for you it is not working because you don't have ANDROID_HOME env variable provided - please re-read an error message and try setting in your system setting - also it may be helpful to run npx react-native doctor and make sure it is passing :)

Its resolved I thinks

from cli.

linq8261 avatar linq8261 commented on July 20, 2024

however I want to use only npx react-native run-android

you can also do npx react-native run-android --terminal

PS FILE_PATH> npx react-native run-android --terminal error: option '--terminal ' argument missing

It was asking string like node, powershell etc.

npx react-native run-android --terminal C:\Windows\System32\cmd.exe

from cli.

Francisco420 avatar Francisco420 commented on July 20, 2024

Why when i run npx react-native@latest init PAP in the final it gives me this im in windowns
image

from cli.

XinrZhou avatar XinrZhou commented on July 20, 2024

npm run start
npm start
npx react-native start
Try the above commands~

from cli.

faraz-stack avatar faraz-stack commented on July 20, 2024

Simple Solution
Run npx react-native start
and after when metro starts successfully and gives you Dev server ready options hit a to run on android and i to run on iOS.
it works for me on android with react native version 0.73.
With react-native version 0.73 it aslo require you to have Java jdk 17.
Capture

from cli.

raphaelrb96 avatar raphaelrb96 commented on July 20, 2024

Eu resolvo meu problema com

npx react-native run-android --terminal powershell

no entanto, quero usar apenas npx react-native run-Android

funcionou!!

from cli.

RobertSavage avatar RobertSavage commented on July 20, 2024

Running: npx react-native run-ios or run ios or react-native run-ios --terminal terminal
Error: EACCES: permission denied

Running: sudo npx react-native run-ios or sudo run ios or sudo react-native run-ios --terminal terminal
Error: Cannot start server in new window because no terminal app was specified.

Fix: As suggested above I ran npm run start with my simulator open. It did not start the app up for me like it usually does but I was able to click into the app and it was running.

MacOS Sonoma 14.1
Apple M3 Pro
React Native v0.73

from cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.