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

[0.76.0 (nightly)] react-native command fails silently #45461

Closed
Tracked by #2131
tido64 opened this issue Jul 16, 2024 · 1 comment
Closed
Tracked by #2131

[0.76.0 (nightly)] react-native command fails silently #45461

tido64 opened this issue Jul 16, 2024 · 1 comment
Assignees
Labels
💻CLI p: Microsoft Partner: Microsoft Partner Resolution: Fixed A PR that fixes this issue has been merged.

Comments

@tido64
Copy link
Collaborator

tido64 commented Jul 16, 2024

Description

On latest nightlies (example: 0.76.0-nightly-20240715-2eb7bcb8d), the react-native command fails silently without a word as to why.

I understand this is part of the effort to decouple @react-native-community/cli from react-native, but the current implementation breaks for all users.

Anyone having written scripts in package.json like below:

{
  "scripts": {
    "start": "react-native start"
  }
}

… or have custom scripts and/or build pipelines that rely on the react-native command, will start seeing failures.

We should keep proxying react-native commands to @react-native-community/cli to avoid breaking current users.

Steps to reproduce

n/a

React Native Version

0.76.0-nightly-20240715-2eb7bcb8d

Affected Platforms

Build - MacOS, Build - Windows, Build - Linux

Output of npx react-native info

n/a

Stacktrace or Logs

n/a

Reproducer

n/a

Screenshots and Videos

No response

@github-actions github-actions bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Jul 16, 2024

This comment was marked as off-topic.

@blakef blakef self-assigned this Jul 16, 2024
@blakef blakef added 💻CLI and removed Needs: Triage 🔍 Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Author Feedback labels Jul 16, 2024
@cortinico cortinico changed the title react-native command fails silently [0.75.0-rc.5] react-native command fails silently Jul 16, 2024
@cortinico cortinico changed the title [0.75.0-rc.5] react-native command fails silently [0.76.0 (nightly)] react-native command fails silently Jul 16, 2024
blakef added a commit to react-native-community/template that referenced this issue Jul 16, 2024
The `react-native` package will no longer depend on the community CLI
packages. The template now owns this dependency. This allows us to
deliver the same experience to users.

See facebook/react-native#45461 for some background
blakef added a commit to blakef/react-native that referenced this issue Jul 17, 2024
Summary:
Pull Request resolved: facebook#45464

Previous work would cause versions >= react-native 0.76 to exit if called through `npx react-native <cmd>`. This was intended to be full deprecated and removed.  The intention was to shift users to calling react-native-community/cli directly.

This change allows commands to be proxied to react-native-community/cli but with no guarantees of success.  It's up to each framework / project to explicitly create that dependency.

This also  provides warnings, which won't go away, suggesting the supported method of calling the community CLI directly.

The outcome is that we're not going to break existing workflows.

closes: facebook#45461

Changelog: [General][Fixed] allow proxying commands from react-native to react-native-community/cli with explicit warning

Differential Revision: D59805357
@cortinico cortinico added the Resolution: Fixed A PR that fixes this issue has been merged. label Jul 18, 2024
cipolleschi pushed a commit that referenced this issue Jul 22, 2024
Summary:
Pull Request resolved: #45464

Previous work would cause versions >= react-native 0.76 to exit if called through `npx react-native <cmd>`. This was intended to be full deprecated and removed.  The intention was to shift users to calling react-native-community/cli directly.

This change allows commands to be proxied to react-native-community/cli but with no guarantees of success.  It's up to each framework / project to explicitly create that dependency.

This also  provides warnings, which won't go away, suggesting the supported method of calling the community CLI directly.

The outcome is that we're not going to break existing workflows.

closes: #45461

Changelog: [General][Fixed] allow proxying commands from react-native to react-native-community/cli with explicit warning

Reviewed By: cortinico

Differential Revision: D59805357

fbshipit-source-id: 21e23b082a9c709effa050d8e7dd04a40f5ab0e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻CLI p: Microsoft Partner: Microsoft Partner Resolution: Fixed A PR that fixes this issue has been merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants