Expo config plugin fails on EAS
We hit an EAS build failure using react-native-video@7.0.0-beta.9 with Expo.
The specific issue is that the Expo config plugin can fail on EAS when lib/commonjs/expo-plugins/withReactNativeVideo is missing from the installed package.
Environment
expo: ~56.0.8
react-native: 0.85.3
react-native-video: 7.0.0-beta.9
react-native-nitro-modules: ^0.35.9
EAS Build: Android
Config
Our app.json included the config plugin:
{
"expo": {
"plugins": ["react-native-video"]
}
}
Error
During EAS config resolution, the build failed before the native build started:
Failed to read the app config file with `expo config` command:
.../node_modules/expo/bin/cli config --json --full --type public exited with non-zero code: 1
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: the following error was thrown when importing .../node_modules/react-native-video/app.plugin.js:
Cannot find module './lib/commonjs/expo-plugins/withReactNativeVideo'
Require stack:
- .../node_modules/react-native-video/app.plugin.js
- .../@expo/config-plugins/build/utils/plugin-resolver.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 was not present.
The TypeScript source exists in the package:
src/expo-plugins/withReactNativeVideo.ts
and the published package appears to include built plugin output locally, so this may be install/postinstall related. The package currently has:
"postinstall": "bun run build || exit 0;"
Our suspicion is that under some EAS install conditions, the postinstall/build step can leave the package without the generated lib/commonjs/expo-plugins output while still exiting successfully.
Expected Behavior
"react-native-video" should resolve as a valid Expo config plugin reliably during expo config, especially on EAS.
Actual Behavior
expo config fails because react-native-video/app.plugin.js imports generated CommonJS plugin output that is missing in the installed package.
Workaround
We replaced the app config entry:
with a local plugin:
"./plugins/withReactNativeVideo.js"
The local plugin mirrors the upstream Expo plugin behavior but does not import react-native-video/app.plugin.js, avoiding the generated lib/commonjs dependency during Expo config resolution.
We verified the workaround by temporarily removing the local installed file:
node_modules/react-native-video/lib/commonjs/expo-plugins/withReactNativeVideo.js
and rerunning:
expo config --json --full --type public
With the local plugin, config resolution still passes.
Expo config plugin fails on EAS
We hit an EAS build failure using
react-native-video@7.0.0-beta.9with Expo.The specific issue is that the Expo config plugin can fail on EAS when
lib/commonjs/expo-plugins/withReactNativeVideois missing from the installed package.Environment
Config
Our
app.jsonincluded the config plugin:{ "expo": { "plugins": ["react-native-video"] } }Error
During EAS config resolution, the build failed before the native build started:
Problem
app.plugin.jsrequires generated CommonJS output:But on the EAS worker, that generated file was not present.
The TypeScript source exists in the package:
and the published package appears to include built plugin output locally, so this may be install/postinstall related. The package currently has:
Our suspicion is that under some EAS install conditions, the postinstall/build step can leave the package without the generated
lib/commonjs/expo-pluginsoutput while still exiting successfully.Expected Behavior
"react-native-video"should resolve as a valid Expo config plugin reliably duringexpo config, especially on EAS.Actual Behavior
expo configfails becausereact-native-video/app.plugin.jsimports generated CommonJS plugin output that is missing in the installed package.Workaround
We replaced the app config entry:
"react-native-video"with a local plugin:
"./plugins/withReactNativeVideo.js"The local plugin mirrors the upstream Expo plugin behavior but does not import
react-native-video/app.plugin.js, avoiding the generatedlib/commonjsdependency during Expo config resolution.We verified the workaround by temporarily removing the local installed file:
and rerunning:
With the local plugin, config resolution still passes.