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

[expo] Disable autolinking if project do not have expo modules installed #22649

Conversation

Kudo
Copy link
Contributor

@Kudo Kudo commented May 25, 2023

Why

to make expo-cli works fine for bare react-native projects without setup expo-modules correctly.
there were errors like this when pod install

[!] Unable to find a specification for `ExpoModulesCore` depended upon by `Expo`

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

close ENG-8606

How

enable rn-cli autolinking only if it passes the simple check for Podfile and settings.gradle

Test Plan

  • ci passed
  • tested on npx react-native@latest init RN071 --version 0.71 project + expo package with this patch
  • tested on npx react-native@latest init RN071 --version 0.71 project + install-expo-modules with this patch
  • tested on yarn create expo -t blank@sdk-48 sdk48 with this patch

Checklist

@linear
Copy link

linear bot commented May 25, 2023

ENG-8606 Investigate feasibility of changing how `expo` is linked

Can we make it so it doesn't need to be linked by react-native-community/autolinking, if we add one additional setup step when installing the package to link it manually? (install-expo-modules could do this for most people)

@expo-bot expo-bot added bot: suggestions ExpoBot has some suggestions bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels May 25, 2023
@Kudo
Copy link
Contributor Author

Kudo commented May 25, 2023

@brentvatne this pr tries to solve ENG-8606 from an easier sanity check. please review if the solution makes sense to you.

@Kudo Kudo marked this pull request as ready for review May 25, 2023 19:13
@Kudo Kudo removed the request for review from ide May 25, 2023 19:13
@Kudo Kudo changed the title [expo] Disable autolinking if projects does not install expo modules [expo] Disable autolinking if project do not have expo modules installed May 25, 2023
Copy link
Member

@brentvatne brentvatne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clever solution! nice on @Kudo

@Kudo Kudo merged commit ba52f93 into main May 26, 2023
7 checks passed
@Kudo Kudo deleted the @kudo/eng-8606-investigate-feasibility-of-changing-how-expo-is-linked branch May 26, 2023 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants