Skip to content

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

Merged
thymikee merged 1 commit intomainfrom
@janic/fix-packager-start
Dec 11, 2023
Merged

fix: packager starting when using run-ios and run-android#2198
thymikee merged 1 commit intomainfrom
@janic/fix-packager-start

Conversation

@janicduplessis
Copy link
Copy Markdown
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

@janicduplessis janicduplessis requested review from szymonrybczak and removed request for adamTrz and thymikee December 8, 2023 21:53
@robhogan
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@RayHughes
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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