Skip to content

fix(example): resolve react/react-native from the example app#6

Merged
pablogdcr merged 1 commit into
mainfrom
fix/example-metro-resolution
Jun 5, 2026
Merged

fix(example): resolve react/react-native from the example app#6
pablogdcr merged 1 commit into
mainfrom
fix/example-metro-resolution

Conversation

@pablogdcr

Copy link
Copy Markdown
Owner

What

In this library + example layout, npm auto-installs the library's peerDependencies (expo, react, react-native) at their latest versions into the repo-root node_modules. The example's Metro watches the monorepo root, so React Native codegen could pull the root's newer react-native and fail:

Unable to determine event arguments for "onModeChange"
  .../react-native/src/private/components/virtualview/VirtualViewNativeComponent.js

Fix

example/metro.config.js: pin the react / react-native singletons to the example's own node_modules (extraNodeModules) and block the root copies (blockList). This makes expo run:android / expo start bundle reliably.

In this library+example layout, npm auto-installs the library's peerDependencies
(expo, react, react-native) at their latest versions into the repo-root
node_modules. The example's Metro watches the monorepo root, so codegen could pull
the root's newer react-native and fail ("Unable to determine event arguments" in
VirtualViewNativeComponent). Pin the react/react-native singletons to the example's
own node_modules and block the root copies.
@pablogdcr pablogdcr merged commit 33e579d into main Jun 5, 2026
4 checks passed
@pablogdcr pablogdcr deleted the fix/example-metro-resolution branch June 5, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant