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

EAS build: Failed to resolve plugin for module #2696

Open
Y-Smirnov opened this issue Nov 15, 2024 · 3 comments · Fixed by #2706
Open

EAS build: Failed to resolve plugin for module #2696

Y-Smirnov opened this issue Nov 15, 2024 · 3 comments · Fixed by #2706

Comments

@Y-Smirnov
Copy link

Build/Submit details page URL

No response

Summary

Hello Expo Team,

EAS build fails to resolve a plugin inside a library.
This was also an issue in Expo and has been fixed in Expo 52 (more specifically @expo/config-plugins v9)
Links: here and here

Although the app uses Expo v52 (which depends on config-plugins v9), eas-cli depends on @expo/config-plugins v8 (which seems to be used when doing eas build).
If that's the case, do you have any plans to update?

Managed or bare?

Bare

Environment

expo-env-info 1.2.1 environment info:
System:
OS: macOS 15.0
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.11.1/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
Watchman: 2024.09.09.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.16.1 - /Users/yevheniismirnov/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.1, iOS 18.1, macOS 15.1, tvOS 18.1, visionOS 2.1, watchOS 11.1
Android SDK:
API Levels: 28, 30, 31, 32, 33, 34, 35
Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.1, 33.0.2, 34.0.0, 35.0.0
System Images: android-24 | Google APIs ARM 64 v8a, android-25 | Google APIs ARM 64 v8a, android-26 | Google APIs Intel x86 Atom_64, android-27 | Google APIs ARM 64 v8a, android-27 | Google Play Intel x86 Atom, android-28 | Google ARM64-V8a Play ARM 64 v8a, android-29 | Google APIs ARM 64 v8a, android-29 | Google Play ARM 64 v8a, android-30 | ARM 64 v8a, android-30 | Google APIs ARM 64 v8a, android-30 | Google Play ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-33 | Google APIs ARM 64 v8a, android-33 | Google Play ARM 64 v8a, android-34 | Google APIs ARM 64 v8a, android-34 | Google Play ARM 64 v8a, android-35 | Google Play ARM 64 v8a
IDEs:
Android Studio: 2024.2 AI-242.21829.142.2421.12409432
Xcode: 16.1/16B40 - /usr/bin/xcodebuild
npmGlobalPackages:
eas-cli: 13.2.0
Expo Workflow: bare

Error output

Failed to resolve plugin for module "react-native-*" relative to "/home/expo/workingdir/build/packages/sample-expo"

Reproducible demo or steps to reproduce from a blank project

.

@Y-Smirnov Y-Smirnov added the needs review Issue is ready to be reviewed by a maintainer label Nov 15, 2024
@szdziedzic
Copy link
Member

Hey, we are working on it

@szdziedzic szdziedzic added eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Nov 19, 2024
szdziedzic added a commit that referenced this issue Nov 25, 2024
# Why

Update `@expo` packages to SDK 52 versions

# How

Update `@expo` packages to SDK 52 versions

Fixes #2696

It seems like the `privacy` field was removed from the expo config in the SDK 52 update: https://expo.dev/changelog/2024/11-12-sdk-52. 

I used `AppPrivay.Unlisted` for the `createApp` mutation input for which this is still required. It was an option selected for an app when `exp.privacy` was undefined.

It also seems that `findWorkspaceRoot` function in `@expo/package-manager` was changed to `resolveWorkspaceRoot`.

# Test Plan

Tests, test commands manually
@Y-Smirnov
Copy link
Author

Hello @szdziedzic

Thank you for taking care of the issue.
I did update to the latest eas-cli (eas-cli/13.4.2) but the issue persists.

Here is the error from the eas build:

Package "react-native-*" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

Cannot use import statement outside a module

I also did run eas build with local option (--local) and had the same issue.
Locally it seems the issue is related to the eas-cli-local-build-plugin being used for the build, which uses @expo/config-plugins v8.
On the EAS Cloud it seems the process may be similar (as it's referenced in docs (--local) simulates the build done on the CLoud) or maybe some other update is required (just sharing my point of view, I definitely don't have the whole picture as I would like to).

Also, I made sure to isolate the issue and ensure (again) the issue is related to have multiple package.json present.
Test scenario was:

  • App uses library build normally (FAILS)
  • App uses library build normally & removed "extra" package.json files during the build script (SUCCESS)

@szdziedzic
Copy link
Member

Hi, I believe this update is needed as well: expo/eas-build#472

@szdziedzic szdziedzic reopened this Nov 28, 2024
szdziedzic added a commit to expo/eas-build that referenced this issue Dec 2, 2024
# Why

expo/eas-cli#2696 - I believe this update needs to land to fix this issue

Bump `@expo` packages to SDK 52 versions

# How

Bump `@expo` packages to SDK 52 versions

# Test Plan

system tests, tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants