Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo SDK 52 - Error: Cannot read property 'regular' of undefined #19

Closed
h14h opened this issue Nov 14, 2024 · 2 comments
Closed

Expo SDK 52 - Error: Cannot read property 'regular' of undefined #19

h14h opened this issue Nov 14, 2024 · 2 comments

Comments

@h14h
Copy link

h14h commented Nov 14, 2024

I got this error after attempting to upgrade my NWUI app to SDK 52, and was able to reproduce it with a minimal Expo example.

Here are my approximate reproduction steps:

  1. npx create-expo-app sdk-test --template tabs
  2. cd sdk-test
  3. Follow the NWUI manual installation instructions
  4. Replace app/(tabs)/index.ts with the "Usage Example" in Step 8
  5. npx expo prebuild --clean followed by npm run ios

When the ios simulator starts up, the app crashes with Error: Cannot read property 'regular' of undefined.

@mrzachnugent
Copy link
Collaborator

Hey @h14h , I think this has to do with https://github.com/roninoss/nativewindui/blob/main/theme/index.ts where the navigation theme now has a font in react-navigation7. You can spread ...DefaultTheme and ...DarkTheme at the top of the light and dark objects respectively.

@h14h
Copy link
Author

h14h commented Nov 14, 2024

@mrzachnugent Thanks! That did it 👍

In that case, I think this issue can be (at least partially) resolved by tweaking the theme/color.ts example in the manual installation instructions.

If I get around to making a PR for the issues I noted in #20, I'll address this there too.

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

No branches or pull requests

2 participants