You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Metro cannot resolve uniwind: package.json has exports but no main #679
Metro (Expo SDK 57 / expo export) fails to resolve import { Uniwind } from "uniwind" with:
Error: While trying to resolve module `uniwind` from file `.../_layout.tsx`,
the package `.../node_modules/uniwind/package.json` was successfully found.
However, this package itself specifies a `main` module field that could not be resolved
(`.../node_modules/uniwind/index`).
packages/uniwind/package.json (v1.12.0, and the Uniwind Pro payload) has an exports map but no top-level main or react-native field. Metro then defaults main to index, which does not exist.
Expo's resolver also matches exports conditions in key order. The "." map currently starts with "style": "./uniwind.css", then "types", then "browser", and only later "react-native". If package exports are skipped or fail, there is no main fallback.
Repro context
We hit this in a pnpm workspace that also has a second app depending on public uniwind, while another app aliases Uniwind Pro:
"uniwind": "npm:uniwind-pro@^1.7.0"
With publicHoistPattern: "*", Node's require("uniwind/metro") can walk past the Pro installer stub and load the public package. Metro then bundles against the stub/payload that has no main.
Activity
github-actions commentedon Sep 18, 2026
This issue must be reported using the official issue templates: Bug report or Bug report (Uniwind Pro).