LoginSignup
13
2

More than 5 years have passed since last update.

react-native-router-flux導入時に出るNo bundle url present

Last updated at Posted at 2017-04-25

How

mac os
react nativeでios app開発

WHAT

https://facebook.github.io/react-native/docs/getting-started.html
公式チュートリアルをはじめて、
https://js.coach/react-native/cairn?sort=popular&category=styling
ここらへんでいい感じのライブラリを見つけて
https://facebook.github.io/react/docs/forms.html
Formの送り方を学び、
次はルーティングだ。react-native-router-fluxがstar数も多くて使えそうだ。ということで
npm i --save react-native-router-flux
を実行した。

すると突然シミュレーターが赤画面に。

試行錯誤

そのあと、pacakage.jsonから
"react-native-router-flux": "3.38.0",
の行を削除し
rm -rf node_modules && npm i
動かないので App/ios/buildを削除し
react-native run-ios
動くようだ。

https://github.com/facebook/react-native/issues/12754
こことかで最近みんな同じ問題に直面しているらしかった。
結局 reactとreact-nativeとreact-native-router-fluxのバージョンがいい感じのバージョンでないと動かないらしい。routerを公式のNavigationを使うてもあるが、、、

サーチを続けると秘伝のタレを紹介している神がいた
https://github.com/aksonov/react-native-router-flux/issues/1816#issuecomment-296857358
この通りにpackage.jsonを書き換えると全てうまく言った。

ようやくアプリの開発ができそうだ。
次はreduxでstateを管理しよう。

追記

packageの問題ではない場合でもNo bundle url present
が出る場合があった。
その時は、
App/ios/buildを削除してから
react-native run-ios
で正常に動いた

13
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
2