Skip to content

[Bug] React Native 0.74.5 contains invalid "../Utilities/Platform" imports causing bundling failures with Expo SDK 51 #37

Description

@Aditya3878

🐛 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions