Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: packager starting when using run-ios and run-android #2198

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

janicduplessis
Copy link
Contributor

Summary:

When the packager is not running findDevServerPort returns startPackager = false which is not what we want. Changing the initial value of startPackager fixes it (we could also add a branch to check for not_running state but it seemed redundant).

Test Plan:

Tested this patch in an app on RN 0.73 and made sure packager starts when running cli on iOS and Android.

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@robhogan
Copy link
Collaborator

I was just about to put up the same fix before I saw this PR. Users are running into this now that 0.73 is out.

The fix looks sound to me. The old code used to mutate the configured value of packager. After #2128, findDevServerPort is only called if packager is true anyway, so falling back to true matches the previous behaviour.

Let's get this merged and picked into 13.x. CC @thymikee.

@szymonrybczak
Copy link
Collaborator

Tests failing because major RN version was bumped, fixed in #2200

@RayHughes
Copy link

RayHughes commented Jan 8, 2024

Does not appear to be fixed in 0.73.2

https://github.com/facebook/react-native/blob/main/CHANGELOG.md#v0732

@szymonrybczak
Copy link
Collaborator

@RayHughes, it should be. 0.73.2 contains CLI v12.3.0, but this fix was released in v12.2.1 🤔

@RayHughes
Copy link

RayHughes commented Jan 8, 2024

@RayHughes, it should be. 0.73.2 contains CLI v12.3.0, but this fix was released in v12.2.1 🤔

I'm on MacOS. This is what I get in both native terminal and Jetbrains.

Screenshot 2024-01-08 at 5 06 06 PM

@szymonrybczak
Copy link
Collaborator

@RayHughes as the error says, we cannot find terminal to start script in. please try providing --terminal flag. Btw the pull request that you're referring to is not related to the error that you're encountering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants