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

Trying to detect host component names triggered the following error (Expected "}" but found "$NonMaybeType") #1720

Open
natew opened this issue Dec 26, 2024 · 1 comment

Comments

@natew
Copy link

natew commented Dec 26, 2024

Describe the bug

Getting this error after upgrading to Expo 52:

Image

Expected behavior

No bug

Steps to Reproduce

Sorry to half-fill this in, was wondering if anyone had any idea how this occurs or any fixes? I can't find anything on google or in the repo, seems like it's somehow hitting flow syntax unexpectedly.

@mdjastrzebski
Copy link
Member

mdjastrzebski commented Dec 26, 2024

Hi @natew, I've tested RNTL 12.x (latest stable) on Expo 52 not long ago in #1689 and all tests in our example apps passed correctly.

The error you have received seems pretty odd, it looks like some Flow processing error ($NonMaybeType) happening when detectHostComponentNames is called in render. This seems a bit unusual, as I would expect such errors to happen before any test execution as Node (Jest) parses all of the imports. This seems to indicate some dynamic import is happening. There is also a Proxy.render in your stack trace.

Are you using normal Expo + Jest setup? Could you provide minimal repro?

Also worth noting is that the RNTL 13, now in RC, drops detectHostComponentNames usage, so you can check if this error occurs also against it.

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