diff --git a/.npmrc b/.npmrc index 132e737..4807da9 100644 --- a/.npmrc +++ b/.npmrc @@ -1,16 +1,11 @@ # React Native / Expo expects a flat (npm/yarn-style) node_modules layout -# where transitive deps are reachable from any package. pnpm's strict -# isolation breaks that — Metro can't resolve @babel/runtime/helpers/*, -# @expo/metro-runtime, react-native-* peers, etc. when they're only -# installed for the package that declared them. +# where ALL transitive deps are reachable from any package. pnpm's strict +# isolation breaks that — Metro hits a fresh missing-module error for every +# transitive dep (invariant, nullthrows, @babel/runtime/helpers/*, ...). # -# These patterns hoist the common RN/Expo dependency families to the -# workspace root node_modules so Metro and the Expo bundler can find -# 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* -public-hoist-pattern[]=*metro* +# shamefully-hoist=true hoists everything to the workspace-root node_modules +# (like npm/yarn) so all transitive deps are reachable via standard Node +# resolution. This is the official Expo monorepo workaround and is the +# only sustainable answer for Expo + RN + pnpm. Desktop (Electron+Vite) +# bundles via Vite, so the flatter layout doesn't affect it. +shamefully-hoist=true