react native 디버그 빌드 후 실행시 오류가 발생하여 해결 방법을 정리해서 올려 봅니다.
오류메세지
Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
빌드하기(배포시)
./gradlew assembleRelease <- 리눅스 기준
gradlew.bat assembleRelease <- 윈도우 기준
빌드하기(디버그시)
./gradlew assembleDebug <- 리눅스 기준
gradlew.bat assembleDebuge <- 윈도우 기준
빌드 후 디바이스에서 직접 테스트
react-native run-android --variant=release
오류발생
Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
[ERROR] InnoDB: Page [page id: space=2271, page number=3242] log sequence number 63216755434 is in the future! Current system log sequence number 29146053693.
Tue, 28 Jul 2020 00:48:16 GMT app:config Package "node-uuid" was not found as an npm dependency in package.json; it won't be included in the webpack vendor bundle.
Consider removing it from vendor_dependencies in ~/config/index.js
Tue, 28 Jul 2020 00:48:16 GMT app:config Looking for environment overrides for NODE_ENV "production".
Tue, 28 Jul 2020 00:48:16 GMT app:config Found overrides, applying to default configuration.
Tue, 28 Jul 2020 00:48:16 GMT app:config Package "node-uuid" was not found as an npm dependency in package.json; it won't be included in the webpack vendor bundle.
Consider removing it from vendor_dependencies in ~/config/index.js
Tue, 28 Jul 2020 00:48:16 GMT app:config Looking for environment overrides for NODE_ENV "production".
Tue, 28 Jul 2020 00:48:16 GMT app:config Found overrides, applying to default configuration.