🐛 Bug Report
Summary
React Native 0.74.5 still contains direct imports from ../Utilities/Platform, which causes Metro bundler errors when using Expo SDK 51 (and likely other setups).
Environment
Expo SDK: 51.0.22
React Native: 0.74.5 (installed via npx expo install react-native@0.74.5)
Platform: Web (Metro bundler)
Node: [your Node version here]
npm: [your npm version here]
OS: [Windows / macOS / Linux]
Steps to Reproduce
1. Create a new Expo app
npx create-expo-app myapp
cd myapp
npx expo install react-native@0.74.5
npx expo start --web
2. Observe bundling failure:
Static Rendering Error (Node.js)
Unable to resolve module ../Utilities/Platform
from node_modules/react-native/Libraries/Components/TextInput/TextInputState.js
Expected Behavior
React Native should only import Platform from the public API:
import { Platform } from 'react-native';
Actual Behavior
These files import ../Utilities/Platform directly:
-
Libraries/Components/TextInput/TextInputState.js
-
Libraries/StyleSheet/processColor.js
-
Libraries/NativeComponent/ViewConfigIgnore.js
This breaks Expo Web bundling out of the box.
Reproducible Demo
A fresh Expo SDK 51 project with RN 0.74.5 reproduces the issue.
🐛 Bug Report
Summary
React Native 0.74.5 still contains direct imports from ../Utilities/Platform, which causes Metro bundler errors when using Expo SDK 51 (and likely other setups).
Environment
Expo SDK: 51.0.22
React Native: 0.74.5 (installed via npx expo install react-native@0.74.5)
Platform: Web (Metro bundler)
Node: [your Node version here]
npm: [your npm version here]
OS: [Windows / macOS / Linux]
Steps to Reproduce
1. Create a new Expo app
npx create-expo-app myapp
cd myapp
npx expo install react-native@0.74.5
npx expo start --web
2. Observe bundling failure:
Static Rendering Error (Node.js)
Unable to resolve module ../Utilities/Platform
from node_modules/react-native/Libraries/Components/TextInput/TextInputState.js
Expected Behavior
React Native should only import Platform from the public API:
import { Platform } from 'react-native';
Actual Behavior
These files import ../Utilities/Platform directly:
Libraries/Components/TextInput/TextInputState.js
Libraries/StyleSheet/processColor.js
Libraries/NativeComponent/ViewConfigIgnore.js
This breaks Expo Web bundling out of the box.
Reproducible Demo
A fresh Expo SDK 51 project with RN 0.74.5 reproduces the issue.