b0967dd2c5
Selective public-hoist patterns weren't enough — RN's index.js imports invariant (and nullthrows, pretty-format, regenerator-runtime, and many more) as bare transitive deps. Each fresh EAS build was hitting a different missing-module error. shamefully-hoist=true is Expo's official monorepo workaround: pnpm mirrors npm/yarn's flat layout at the workspace root, so every package's deps are reachable via standard Node resolution. Desktop (Vite-bundled) is unaffected.
12 lines
677 B
Plaintext
12 lines
677 B
Plaintext
# React Native / Expo expects a flat (npm/yarn-style) node_modules layout
|
|
# 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/*, ...).
|
|
#
|
|
# 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
|