react / react/react-native

React Native Bundler Bug?

オープン
#49,995 コメント 12 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

📦Bundler Needs: Attention Needs: Repro Stale
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description

I'm not sure what's going on. I spent the afternoon trying to figure out how to run a new React Native project at version 0.78.0. I simply created a new project using the following command:

npx @react-native-community/cli@17.0.0 init AwesomeProject --version 0.78.0

The project was created, and I was able to build it successfully. However, as soon as I ran the Metro bundler, the app displayed a black screen. I had to manually close the app and reopen it for anything to appear.

Steps to reproduce
  1. First init a new project with npx @react-native-community/cli@17.0.0 init AwesomeProject --version 0.78.0
  2. Run npm run android && npm run start
  3. Await it to build, as soon as the app run close it, and open again manually.
React Native Version

0.78.0

Output of npx @react-native-community/cli info
System:
  OS: Linux 6.8 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
  CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
  Memory: 11.77 GB / 31.28 GB
  Shell:
    version: 5.2.21
    path: /bin/bash
Binaries:
  Node:
    version: 18.18.0
    path: ~/.nvm/versions/node/v18.18.0/bin/node
  Yarn:
    version: 1.22.19
    path: /usr/bin/yarn
  npm:
    version: 10.8.3
    path: ~/.nvm/versions/node/v18.18.0/bin/npm
  Watchman:
    version: 20231224.093142.0
    path: /usr/local/bin/watchman
SDKs:
  Android SDK:
    API Levels:
      - "26"
      - "27"
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 28.0.3
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
      - 35.0.1
    System Images:
      - android-26 | Intel x86 Atom
      - android-26 | Intel x86 Atom_64
      - android-26 | Google APIs Intel x86 Atom_64
      - android-27 | Intel x86 Atom
      - android-27 | Intel x86 Atom_64
      - android-28 | Intel x86 Atom
      - android-28 | Intel x86 Atom_64
      - android-28 | Google Play Intel x86 Atom
      - android-28 | Google Play Intel x86 Atom_64
      - android-35 | Google APIs Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: Not Found
Languages:
  Java:
    version: 11.0.26
    path: /usr/bin/javac
  Ruby:
    version: 3.2.3
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.0
    wanted: 0.78.0
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false
Screenshots and Videos

No response

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

指定された CLI コマンドで React Native 0.78.0 を作成して問題を再現し、報告された Android 環境で npm run android  npm run start を実行します。まず Metro bundler の起動経路を追跡し、初回起動とアプリを再度開いた場合を比較します。新しくビルドしたアプリが、手動で閉じて再度開かなくても初回起動時に正常に表示されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, javascript, react-native
領域
build-system, mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。