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-dev-launcher] fix config plugin when expo-updates isn't found #15541

Merged
merged 2 commits into from
Dec 14, 2021

Conversation

esamelson
Copy link
Contributor

Why

Brent reported the dev launcher config plugin was failing with the following error in projects without expo-updates:

» ios: expo-dev-launcher: Failed to check compatibility with expo-updates - Error: Cannot find module 'expo-updates'
Require stack:
- /Users/brentvatne/code/stackexample/noop.js

As of SDK 44, expo-updates is no longer included in the bare template project, whereas previously it was in every project, so this case likely just wasn't properly tested before now.

How

Verified the error is coming from the resolveFrom module, put a try-catch around it.

Test Plan

I was getting weird behavior when trying to test this locally; the "Config syncing" step would totally hang (not even Ctrl-C could stop it). However, before this change I did indeed see the same warning as Brent, and after pasting this file into node_modules and trying again, I no longer saw the warning.

Checklist

  • Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md).
  • This diff will work correctly for expo build (eg: updated @expo/xdl).
  • This diff will work correctly for expo prebuild & EAS Build (eg: updated a module plugin).

@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Dec 14, 2021
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.

i tried running this on an SDK 44 beta project (EXPO_BETA=1 expo init, blank project, expo install expo-dev-client, expo prebuild) and while i didn't get the expo-updates warning, it still failed with the following:

✔ Config synced
⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod repo update` failed.
└─ Cause: Couldn't install: expo-dev-client » expo-dev-launcher. Ensure the node module "expo-dev-launcher" is installed in your project, then run `npx pod-install` to try again.

you can repro this in https://github.com/brentvatne/dev-client-plugin-repro by running expo prebuild

@esamelson
Copy link
Contributor Author

@brentvatne did you replace just the one file, or the entire module? Your error could be because of 32f5666

@brentvatne
Copy link
Member

brentvatne commented Dec 14, 2021

@esamelson esamelson merged commit 8baaa74 into master Dec 14, 2021
@esamelson esamelson deleted the @eric/dc-fix-plugin branch December 14, 2021 22:36
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