Skip to content

[Bug] [v7] Expo config plugin fails on EAS #4910

Description

@robgraeber

What happened?

An EAS build fails using react-native-video@7.0.0-beta.9 with Expo. The Expo config plugin can
fail on EAS when lib/commonjs/expo-plugins/withReactNativeVideo is missing from the installed
package.

Error (during EAS config resolution, before the native build)

Unable to resolve a valid config plugin for react-native-video.
main export of react-native-video does not appear to be a config plugin:
Cannot find module './lib/commonjs/expo-plugins/withReactNativeVideo'
Require stack:
- .../node_modules/react-native-video/app.plugin.js
MODULE_NOT_FOUND

Problem
app.plugin.js requires generated CommonJS output
(module.exports = require('./lib/commonjs/expo-plugins/withReactNativeVideo')), but on the EAS
worker that generated file is not present. The TS source exists (src/expo-plugins/withReactNativeVideo.ts).
The package uses "postinstall": "bun run build || exit 0;", so under some EAS install conditions
the postinstall/build can leave the package without the generated lib/commonjs/expo-plugins
output while still exiting successfully.

Expected: "react-native-video" should resolve as a valid Expo config plugin reliably during
expo config, especially on EAS.

Workaround
Replace the "react-native-video" app-config entry with a local plugin
("./plugins/withReactNativeVideo.js") that mirrors the upstream plugin but does not import
react-native-video/app.plugin.js, avoiding the generated lib/commonjs dependency during config
resolution. Verified by removing the installed
node_modules/react-native-video/lib/commonjs/expo-plugins/withReactNativeVideo.js and rerunning
expo config - config resolution still passes with the local plugin.

Steps to reproduce

  1. Use react-native-video@7.0.0-beta.9 with Expo (~56) and add "react-native-video" to app.json plugins.
  2. Trigger an EAS build (Android) / run expo config --json --full --type public.
  3. Config resolution fails with MODULE_NOT_FOUND for ./lib/commonjs/expo-plugins/withReactNativeVideo.

Reproduction repository

No response

react-native-video version

7.0.0-beta.9

react-native version

0.85.3

react-native-nitro-modules version

0.35.9

Platforms

Android

OS version

No response

Device

No response

Architecture

No response

Expo

Yes (Expo Dev Client)

Last working version

No response

Media / source type

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions