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
- Use
react-native-video@7.0.0-beta.9 with Expo (~56) and add "react-native-video" to app.json plugins.
- Trigger an EAS build (Android) / run
expo config --json --full --type public.
- 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
What happened?
An EAS build fails using
react-native-video@7.0.0-beta.9with Expo. The Expo config plugin canfail on EAS when
lib/commonjs/expo-plugins/withReactNativeVideois missing from the installedpackage.
Error (during EAS config resolution, before the native build)
Problem
app.plugin.jsrequires generated CommonJS output(
module.exports = require('./lib/commonjs/expo-plugins/withReactNativeVideo')), but on the EASworker 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 conditionsthe postinstall/build can leave the package without the generated
lib/commonjs/expo-pluginsoutput while still exiting successfully.
Expected:
"react-native-video"should resolve as a valid Expo config plugin reliably duringexpo 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 importreact-native-video/app.plugin.js, avoiding the generatedlib/commonjsdependency during configresolution. Verified by removing the installed
node_modules/react-native-video/lib/commonjs/expo-plugins/withReactNativeVideo.jsand rerunningexpo config- config resolution still passes with the local plugin.Steps to reproduce
react-native-video@7.0.0-beta.9with Expo (~56) and add"react-native-video"toapp.jsonplugins.expo config --json --full --type public.MODULE_NOT_FOUNDfor./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