After upgrading to Expo SDK 55 (React Native 0.83, New Architecture), my app crashes when loading any screen that uses expo-video. In React Native DevTools, NativeVideoView.js appears completely empty (just line 1, no content), and I get:
Failed to fetch source url "" for scriptId 5: Can't parse requested URL ""
The actual file on disk at node_modules/expo-video/build/NativeVideoView.js has correct content:
import { requireNativeViewManager } from 'expo-modules-core';
import { Platform } from 'react-native';
const defaultViewName = Platform.OS === 'android' ? 'SurfaceVideoView' : 'VideoView';
export default requireNativeViewManager('ExpoVideo', defaultViewName);
I have already tried the following things:
prebuild --clean+run:iosmultiple timesRemoved
useFrameworks: "static"fromapp.config.tsandPodfile.properties.jsonCleared Metro cache with
expo start -cDeleted
node_modules,ios/Pods,ios/Podfile.lockand reinstalledCleared Xcode DerivedData
Added
unstable_conditionNames: ['react-native', 'require', 'default']tometro.config.js
My setup:
Expo SDK
55.0.15expo-video:55.0.15react-native:0.83.4react-native-reanimated:4.2.1react-native-worklets:0.7.2
expo-modules-core is not at top-level node_modules — it lives nested inside expo/node_modules/expo-modules-core
My metro config:
const { wrapWithReanimatedMetroConfig } = require('react-native-reanimated/metro-config');
const { getSentryExpoConfig } = require("@sentry/react-native/metro");
const config = getSentryExpoConfig(__dirname);
config.resolver.sourceExts.push('cjs');
config.resolver.unstable_conditionNames = ['react-native', 'require', 'default'];
module.exports = wrapWithReanimatedMetroConfig(config);
Why is Metro bundling NativeVideoView.js as an empty file, and how do I force it to resolve expo-modules-core to its .native.tsx platform-specific files correctly in Expo SDK 55?