Skip to content

Commit

Permalink
[v10] Fix expo template with RN upgrade (#2745)
Browse files Browse the repository at this point in the history
* Upgrade RN

To fix expo/expo#31005

* Workaround for 0.74.5 upgrade

Without this patch, the JS bundle fails to load with:

```
iOS Bundling failed 3255ms node_modules/expo/AppEntry.js (1892 modules)
Unable to resolve "react-native/Libraries/Utilities/DevLoadingView" from "node_modules/@expo/metro-runtime/build/LoadingView.native.js"
```

This is in a conditional in LoadingView.native.js that should load the
correct one, and does, so this appears to be an issue with conditional
requires. I'm not sure how to fix that underlying issue just yet, so
patching for now.
  • Loading branch information
lindboe authored Aug 14, 2024
1 parent a1ae047 commit 6e4e17a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion boilerplate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"mobx-state-tree": "5.3.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.3",
"react-native": "0.74.5",
"react-native-drawer-layout": "4.0.0-alpha.9",
"react-native-gesture-handler": "~2.16.1",
"react-native-mmkv": "^2.12.2",
Expand Down
13 changes: 13 additions & 0 deletions boilerplate/patches/@expo+metro-runtime+3.2.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@expo/metro-runtime/build/LoadingView.native.js b/node_modules/@expo/metro-runtime/build/LoadingView.native.js
index c7ba770..b29469c 100644
--- a/node_modules/@expo/metro-runtime/build/LoadingView.native.js
+++ b/node_modules/@expo/metro-runtime/build/LoadingView.native.js
@@ -6,7 +6,7 @@ try {
}
catch {
// In react-native 0.75.0 LoadingView was renamed to DevLoadingView
- LoadingView = require('react-native/Libraries/Utilities/DevLoadingView');
+ // LoadingView = require('react-native/Libraries/Utilities/DevLoadingView');
}
exports.default = LoadingView;
//# sourceMappingURL=LoadingView.native.js.map

0 comments on commit 6e4e17a

Please sign in to comment.