4
4

More than 5 years have passed since last update.

メモ:ReactNativeデバッグ時のコマンド

Last updated at Posted at 2018-08-03

エラー:"Port already in use", "No bundle url present" など

lsof -i :8081
kill -9 <PID>

Source:
https://facebook.github.io/react-native/docs/troubleshooting


エラー:"does not exist in the Haste Mmodule map"など

  • キャッシュのクリーンアップ
    watchman watch-del-all
    rm -rf node_modules && npm install
    rm -rf /tmp/metro-bundler-cache-*
    rm -fr /tmp/haste-map-react-native-packager-*

  • Buildキャッシュのクリーンアップ
    rm -f /ios/build

まとめると
rm -f /ios/build && watchman watch-del-all && rm -fr /tmp/haste-map-react-native-packager-* && rm -rf /tmp/metro-bundler-cache-*

source:
https://github.com/facebook/react-native/issues/12754
https://gist.github.com/RidaRidss/27e6de16af0a742354f60bf7ea6c9111


エラー: Unable to execute JS call: __fbBatchedBride is undefined

manually bundle

react-native bundle --dev false --platform ios --entry-file index.ios.js --bundle-output ios/main.jsbundle --assets-dest ./ios

regenerate the main.jsbundle file

react-native bundle --entry-file ./index.ios.js --platform ios --bundle-output ios/main.jsbundle

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

エラー:application has not been registered

index.jsの<App Name>をupdate
source:
https://stackoverflow.com/questions/38340360/react-native-application-has-not-been-registered-error

エラー:The following build commands failed: Analyze node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c

rm -rf ios/build/ModuleCache/*
then
react-native run-ios
source:
https://github.com/facebook/react-native/issues/12609

rm -rf ~/.rncache
https://github.com/facebook/react-native/issues/14423

4
4
0

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
4
4