expo / config-plugins

Out-of-tree Expo config plugins for packages that haven't adopted the config plugin system yet.
427 stars 91 forks source link

Missing expo-build-properties dependency #157

Open lachenmayer opened 1 year ago

lachenmayer commented 1 year ago

Summary

Hey there, I'm currently trying to install ffmpeg-kit-react-native using the config plugin.

It seems there's a small dependency (or documentation?) issue: after installing ffmpeg-kit-react-native and @config-plugins/ffmpeg-kit-react-native, eas build fails with Error: Cannot find module 'expo-build-properties'.

From what I can tell, a simple solution would be to add expo-build-properties to @config-plugins/ffmpeg-kit-react-native's dependencies, as it is imported here:

https://github.com/expo/config-plugins/blob/a6d6b1dff8a3bffbee6e7cb767e0b71ede0ee02b/packages/ffmpeg-kit-react-native/src/withFFMPEG.ts#L6

This was introduced in #114. In that PR, expo-build-properties was added as a dependency to another config plugin (react-native-webrtc - see diff), so this just seems like a small oversight.

Alternatively, this could be added as a peerDependency - in that case, it would be great to update the installation docs to include adding the expo-build-properties dependency.

Duplicate bug report (closed, but not fixed): #148

Config Plugin

@config-plugins/ffmpeg-kit-react-native

What platform(s) does this occur on?

Android, iOS

SDK Version

47

Reproducible demo

In a fresh Expo project...

  1. yarn add ffmpeg-kit-react-native @config-plugins/ffmpeg-kit-react-native
  2. yarn eas build --platform all

This fails with the following error, no build is submitted to EAS:

    Error: Cannot find module 'expo-build-properties'
    Require stack:
    - ...redacted.../app/node_modules/@config-plugins/ffmpeg-kit-react-native/build/withFFMPE
    G.js
    - ...redacted.../app/node_modules/@config-plugins/ffmpeg-kit-react-native/app.plugin.js
    - ...redacted.../app/node_modules/eas-cli/node_modules/@expo/config-plugins/build/utils/p
    lugin-resolver.js
    - ...redacted.../app/node_modules/eas-cli/node_modules/@expo/config-plugins/build/plugins
    /withStaticPlugin.js
    - ...redacted.../app/node_modules/eas-cli/node_modules/@expo/config-plugins/build/plugins
    /withPlugins.js
    - 
    ...redacted.../app/node_modules/eas-cli/node_modules/@expo/config-plugins/build/index.js
    - ...redacted.../app/node_modules/eas-cli/build/project/ios/bundleIdentifier.js
    - ...redacted.../app/node_modules/eas-cli/build/credentials/ios/api/GraphqlClient.js
    - ...redacted.../app/node_modules/eas-cli/build/credentials/context.js
    - ...redacted.../app/node_modules/eas-cli/build/submit/context.js
    - ...redacted.../app/node_modules/eas-cli/build/build/runBuildAndSubmit.js
    - ...redacted.../app/node_modules/eas-cli/build/commands/build/index.js
    - ...redacted.../app/node_modules/eas-cli/node_modules/@oclif/core/lib/module-loader.js
    - ...redacted.../app/node_modules/eas-cli/node_modules/@oclif/core/lib/config/plugin.js
    - ...redacted.../app/node_modules/eas-cli/node_modules/@oclif/core/lib/config/config.js
    - ...redacted.../app/node_modules/eas-cli/node_modules/@oclif/core/lib/config/index.js
    - ...redacted.../app/node_modules/eas-cli/node_modules/@oclif/core/lib/command.js
    - ...redacted.../app/node_modules/eas-cli/node_modules/@oclif/core/lib/index.js
    - ...redacted.../app/node_modules/eas-cli/bin/run
    Code: MODULE_NOT_FOUND
  1. yarn add expo-build-properties, and re-run the EAS build command: build is submitted as expected ✅
fruitptr commented 2 months ago

I'm experiencing the same issue. Did you find a fix?