eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

Local build PluginError: Failed to resolve plugin for module "x" relative to "x"

Open jordmccord opened this issue 1 year ago • 2 comments

Build/Submit details page URL

No response

Summary

When running a build locally with the EAS_LOCAL_BUILD_WORKINGDIR set and any plugins in the config I get the following error PluginError: Failed to resolve plugin for module "expo-xml-font" relative to "eas-build/build/apps/native-ui-storybook"

Before adding a plugin this command was working. I've cleared node modules and reinstalled etc.

Managed or bare?

Managed

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.5
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v18.17.0/bin/yarn
      npm: 10.5.1 - ~/.nvm/versions/node/v18.17.0/bin/npm
      Watchman: 2024.04.15.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.15.2 - /Users/jordmccord/.rvm/gems/ruby-2.7.6/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
    IDEs:
      Android Studio: 2022.2 AI-222.4459.24.2221.10121639
      Xcode: 15.4/15F31d - /usr/bin/xcodebuild
    npmGlobalPackages:
      eas-cli: 10.0.0
    Expo Workflow: managed
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check for issues with metro config
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that packages match versions required by installed Expo SDK
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK

Didn't find any issues with the project!

Error output

[INSTALL_DEPENDENCIES] Done in 48.5s
The NODE_ENV environment variable is required but was not specified. Ensure the project is bundled with Expo CLI or NODE_ENV is set.
Proceeding without mode-specific .env
Could not find plugin "expo-xml-font"
[READ_APP_CONFIG] Could not find plugin "expo-xml-font"
[READ_APP_CONFIG]
PluginError: Failed to resolve plugin for module "expo-xml-font" relative to "eas-build/build/apps/native-ui-storybook"
    at resolvePluginForModule (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js:72:11)
    at resolveConfigPluginFunctionWithInfo (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js:152:7)
    at resolveConfigPluginFunction (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js:143:7)
    at withStaticPlugin (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js:87:70)
    at /Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/plugins/withPlugins.js:30:84
    at Array.reduce (<anonymous>)
    at withPlugins (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config-plugins/build/plugins/withPlugins.js:30:18)
    at withConfigPlugins (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config/build/plugins/withConfigPlugins.js:36:47)
    at fillAndReturnConfig (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config/build/Config.js:218:78)
    at getConfig (/Users/jordmccord/.npm/_npx/fc877ae864f0cd09/node_modules/@expo/config/build/Config.js:270:12)

Build failed
Unknown error. See logs of the Read app config build phase for more information.
npx exited with non-zero code: 1
Error: npx exited with non-zero code: 1
    at ChildProcess.completionListener (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@expo/spawn-async/build/spawnAsync.js:41:23)
    at Object.onceWrapper (node:events:629:26)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1091:16)
    at ChildProcess._handle.onexit (node:internal/child_process:302:5)
    ...
    at spawnAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at runLocalBuildAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/local.js:42:56)
    at async /Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/build.js:85:13
    at async startBuildAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:290:12)
    at async prepareAndStartBuildAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:276:19)
    at async runBuildAndSubmitAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/build/runBuildAndSubmit.js:104:49)
    at async Build.runAsync (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/commands/build/index.js:42:9)
    at async Build._run (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/command.js:80:22)
    at async Config.runCommand (/Users/jordmccord/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@oclif/core/lib/config/config.js:301:25) {
  pid: 83351,
  output: [ '', '' ],
  stdout: '',
  stderr: '',
  status: 1,
  signal: null
}
    Error: build command failed.
 ELIFECYCLE  Command failed with exit code 1.

Reproducible demo or steps to reproduce from a blank project

Run the command EAS_LOCAL_BUILD_WORKINGDIR='./eas-build' eas build --profile preview -p ios --local --output './build/native-ui.tar.gz' with at least one plugin in your app.config.js file.

Preview build:

preview": {
  "cache": {
    "paths": ["./ios/Podfile.lock"]
  },
  "env": {
    "STORYBOOK_ENABLED": "true"
  },
  "ios": {
    "simulator": true
  },
  "android": {
    "buildType": "apk"
  }
},

See the full output of the build: https://github.com/utilitywarehouse/design-systems/actions/runs/9500789585/job/26184697940

jordmccord avatar Jun 14 '24 09:06 jordmccord

no response????

erdajt avatar May 12 '25 13:05 erdajt

Did you find a solution to this despite the lack of a response?

JuliAnyday avatar Oct 14 '25 07:10 JuliAnyday