Unexpected token '?' no stack in React Native

Viewed 90

I'm getting unexpected token '?' error. But, on debug mode, the error disappears.

enter image description here

1 Answers

This is a little bit late but I think it may help other

In my case, This issue happen to me after I install an example app with: "metro-config": "^0.72.1" and "react-native": "0.70.0-rc.4". while my main app still using "react-native": "0.66.4"

It also replicated when I revert the code. So I came up with this solution:

  1. Delete that example app
  2. Reset
  3. do the yarn cache clean and npm cache clean -f

And the problem dissapear.

Related