Skip to content

Regression from PR #47458: Cannot install React Native from Git anymore #50460

@MicroDroid

Description

@MicroDroid

Description

This PR updates shouldSkipGenerationForRncore as such it checks if .../ReactCommon exists before deciding to skip rncore generation, whereas previously it would check .../ReactCommon/react/renderer/components/rncore specifically.

This change breaks installations from Git.

I noticed this while upgrading from 0.76.2 to 0.78.1.

Per my debugging:

  • Previous behavior:
    • When installing from NPM: rncore is pre-generated using the prepack script
    • When installing from Git: rncore gets generated when running pod install
  • Current behavior:
    • When installing from NPM: rncore is pre-generated using the prepack script
    • When installing from Git: rncore will NOT get generated when running pod install because .../ReactCommon is detected as exists even though .../ReactCommon/react/renderer/components/rncore does not

Steps to reproduce

npx @react-native-community/cli@latest init BuggyReactNative
cd ./BuggyReactNative/
npm install 'https://gitpkg.vercel.app/facebook/react-native/packages/react-native?0.78-stable'
cd ./ios/
bundle exec pod install
cd ..
ls ./node_modules/react-native/ReactCommon/react/renderer/components/rncore
# 💥 no such file or directory
# 💥 Xcode won't build the project

React Native Version

0.78.1

Affected Platforms

Runtime - iOS, Other (please specify)

Output of npx @react-native-community/cli info

Not relevant

Stacktrace or Logs

Not relevant

Reproducer

Run the reproducer bash script so you can test with your toolchain not mine

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Impact: RegressionDescribes a behavior that used to work on a prior release, but stopped working recently.Needs: AttentionIssues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.Needs: Version Info

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions