Open 1cedsoda opened 2 weeks ago
This issue arises because the package doesn't include the src directory when published, but the react-native field in the package.json points to src/index. Since Metro gives priority to the react-native field over other fields when resolving the package, this causes the problem.
Description
Metro is unable to resolve Unable to resolve @gluestack-ui/nativewind-utils
CodeSandbox/Snack link
https://codesandbox.io/p/devbox/gluestack-nativewind-utils-import-bug-shxl6r (works in this codesandbox but not locally)
Steps to reproduce
import { tva } from "@gluestack-ui/nativewind-utils";
Metro bundler error:
Or
Fix:
Add tva path
import { tva } from "@gluestack-ui/nativewind-utils/tva";
gluestack-ui Version
3.3.1
Platform
Other Platform
supposedly all platforms
Additional Information
"@gluestack-ui/nativewind-utils": "^1.0.23",