fix(mobile): hoist expo + correct @expo/metro-runtime version for SDK 52

PackageList.java generated by RN autolinking imported expo.core.ExpoModulesPackage
(old SDK <48 name). Root cause: RN CLI couldn't read expo's react-native.config.js
through the pnpm symlink (it lives at .pnpm/expo@52..../expo/react-native.config.js),
so it fell back to deriving the import path from expo's Android gradle namespace
("expo.core") + assumed class name (ExpoModulesPackage), producing a path that
doesn't exist (the actual class lives at expo.modules.ExpoModulesPackage).

Added "expo" to .npmrc public-hoist-pattern so RN's autolinking can resolve
expo's react-native.config.js via the standard node_modules lookup. That config
explicitly sets packageImportPath to the correct expo.modules.ExpoModulesPackage.

Also corrected @expo/metro-runtime from 55.0.11 (added blindly earlier) to ~4.0.1
which is the SDK-52-aligned version.
This commit is contained in:
byGalax
2026-05-14 21:23:54 +02:00
parent 4068e8c7b6
commit f8859b4601
3 changed files with 28 additions and 69 deletions
+1
View File
@@ -9,6 +9,7 @@
# them via the standard Node resolution algorithm.
public-hoist-pattern[]=*@babel/runtime*
public-hoist-pattern[]=@expo/*
public-hoist-pattern[]=expo
public-hoist-pattern[]=expo-*
public-hoist-pattern[]=*react-native*
public-hoist-pattern[]=@react-native*