react / react/react-native

Crash on startup after upgrading to React Native 0.82.1 – TypeError: Cannot read property 'prototype' of undefined

未关闭
#55,530 8 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Needs: Attention Needs: Repro
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

After upgrading my existing React Native project to 0.82.1, the application crashes immediately on startup on Android with a red screen error:

[runtime not ready]: TypeError: Cannot read property 'prototype' of undefined

Steps to reproduce

Upgrade an existing React Native project to 0.82.1

Run the app using:

yarn android

App launches
App crashes immediately with a red screen

React Native Version

0.82.1

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info
System:
  OS: macOS 14.x
  CPU: Apple Silicon
  Memory: XX GB
  Shell: zsh

Binaries:
  Node: 22.x
  Yarn: 1.22.x
  npm: 10.x

SDKs:
  Android SDK: Installed
Stacktrace or Logs
[runtime not ready]: TypeError: Cannot read property 'prototype' of undefined
stack:
anonymous@111327:104
loadModuleImplementation@275:13
guardedLoadModule@182:37
metroRequire@96:91
anonymous@148097:30
loadModuleImplementation@275:13
guardedLoadModule@182:37
metroRequire@96:91
anonymous@172102:48
loadModuleImplementation@275:13
guardedLoadModule@182:37
metroRequire@96:91
global@345973:3
MANDATORY Reproducer

https://github.com/facebook/react-native/issues

Screenshots and Videos
Image

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,在一个已升级到 0.82.1 的现有 React Native 项目中,于 Android 上运行 yarn android 以复现崩溃。检查提供的启动堆栈跟踪和运行时错误;完成标准是识别出兼容性问题,并确认应用能够启动且不会出现红屏 TypeError。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, react-native
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。