What happened
After installing react-native-web@0.21.3, expo export --platform web fails for an app that uses uniwind + expo-router:
WARN The package …/node_modules/uniwind contains an invalid package.json configuration.
Reason: The resolution for "…/node_modules/uniwind/components/InputAccessoryView" defined in "exports"
is …/node_modules/uniwind/dist/module/components/web/InputAccessoryView.js,
however this file does not exist. Falling back to file-based resolution.
Error: Unable to resolve module ./exports/InputAccessoryView from
…/node_modules/react-native-web/dist/index.js: ./exports/InputAccessoryView could not be found
Import stack:
node_modules/react-native-web/dist/index.js | import "./exports/InputAccessoryView"
node_modules/expo-router/build/renderRootComponent.js | import "react-native-web/dist/index"
node_modules/expo-router/entry.js | import "expo-router/entry-classic"
Environment
uniwind 1.12.0 (reproduced on 1.9.0, 1.10.0, 1.10.1, 1.11.0 too)
expo 56.0.22
@expo/metro-config 56.0.19
metro 0.87.1
react-native 0.85.3
react-native-web 0.21.3 (0.21.2 and earlier are fine)
node 22.22.0
Root cause
webResolver in packages/uniwind/src/bundler/adapters/metro/resolvers.ts rewrites any resolution whose filePath lives under /react-native-web/ into uniwind/components/<Name>, where <Name> is the last directory of the resolved file, provided <Name> is listed in SUPPORTED_COMPONENTS:
if (
isInternalOrigin(context.originModulePath)
|| resolution.type !== 'sourceFile'
|| !resolution.filePath.includes(`${sep}react-native-web${sep}`)
) {
return resolution
}
SUPPORTED_COMPONENTS has 23 entries, but components/web/ only contains 22 of them. InputAccessoryView exists only as packages/uniwind/src/components/native/InputAccessoryView.tsx — there is no web file, so the rewrite always points at a path that does not exist.
Verified against main:
SUPPORTED_COMPONENTS: 23
without a web implementation: [ 'InputAccessoryView' ]
Why it only broke now
This is a latent bug that react-native-web exposed. Its dist/index.js only started re-exporting InputAccessoryView in 0.21.3:
rnw 0.21.0: exports InputAccessoryView from dist/index.js -> 0
rnw 0.21.1: -> 0
rnw 0.21.2: -> 0
rnw 0.21.3: -> 1 (published 2026-09-25)
Before that, nothing ever requested react-native-web/dist/exports/InputAccessoryView, so the rewrite never fired.
Impact
The web bundle fails entirely. There is no supported way for a user to work around it: uniwind/components/InputAccessoryView is a hard-coded rewrite target.
I worked around it locally by (a) pinning react-native-web to 0.21.2, or (b) intercepting that one specifier in resolver.resolveRequest and returning the react-native-web module. Neither is great: (a) freezes a dependency, (b) means patching the resolver from userland.
Suggested fix
Either ship a web implementation / no-op stub for InputAccessoryView in components/web/, or make the resolution platform-aware and skip the rewrite when there is no web implementation for the component.
Related
This is not covered by #691 (fix: resolver skips rewrite when parent directory is react-native) — that one fixes a different trigger, where the project path itself contains a react-native directory. Here the guard still matches, because react-native-web/dist/exports/InputAccessoryView/index.js starts with react-native-web/.
What happened
After installing
react-native-web@0.21.3,expo export --platform webfails for an app that uses uniwind + expo-router:Environment
Root cause
webResolverinpackages/uniwind/src/bundler/adapters/metro/resolvers.tsrewrites any resolution whosefilePathlives under/react-native-web/intouniwind/components/<Name>, where<Name>is the last directory of the resolved file, provided<Name>is listed inSUPPORTED_COMPONENTS:SUPPORTED_COMPONENTShas 23 entries, butcomponents/web/only contains 22 of them.InputAccessoryViewexists only aspackages/uniwind/src/components/native/InputAccessoryView.tsx— there is no web file, so the rewrite always points at a path that does not exist.Verified against
main:Why it only broke now
This is a latent bug that
react-native-webexposed. Itsdist/index.jsonly started re-exportingInputAccessoryViewin 0.21.3:Before that, nothing ever requested
react-native-web/dist/exports/InputAccessoryView, so the rewrite never fired.Impact
The web bundle fails entirely. There is no supported way for a user to work around it:
uniwind/components/InputAccessoryViewis a hard-coded rewrite target.I worked around it locally by (a) pinning
react-native-webto0.21.2, or (b) intercepting that one specifier inresolver.resolveRequestand returning the react-native-web module. Neither is great: (a) freezes a dependency, (b) means patching the resolver from userland.Suggested fix
Either ship a web implementation / no-op stub for
InputAccessoryViewincomponents/web/, or make the resolution platform-aware and skip the rewrite when there is no web implementation for the component.Related
This is not covered by #691 (
fix: resolver skips rewrite when parent directory is react-native) — that one fixes a different trigger, where the project path itself contains areact-nativedirectory. Here the guard still matches, becausereact-native-web/dist/exports/InputAccessoryView/index.jsstarts withreact-native-web/.