事象
ReactNative初心者です。
ReactNativeでアプリを作成し、最初のビルドでいきなりハマりました。
事象としては、アプリ起動時に以下のようなエラーがログ上に表示され、シミュレータは真っ白な画面になりました。
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
対応
エラー内容で調べると、エラー自体は正確に何が間違っているかは表しておらず、もっと掘り下げて調べる必要があるそうです。
ただ、その前にキャッシュをクリアすると上手くいく可能性があることを共有している方がいました。
Fixed the issue on my end by double checking that i modified all the files correctly during my RN upgrade, then running
watchman watch-del-all
, andreact-native start --reset-cache
. Then on android, build -> clean. then it worked! sigh
Invariant Violation: Module AppRegistry is not a registered callabel module (calling runApplication)
自分の場合は、以下の記事を参考にさせて頂き、正常に起動することができました。
lsof -n -P -i :8081 -t | xargs kill
rm -rf ios/build
rm -rf android/app/build
rm -rf node_modules
npm install
ReactNative開発者にとっては定番の問題なのですかね?
とにかく、開発を進められそうで良かったです。参考にさせて頂いた方、ありがとうございました。