1Delete your yarn.lock/package-json.lock file and run yarn/npm install.
2
3Then try clearing cache with npx react-native start --reset-cache/expo start -c
4
51.Upgrade deps (https://reactnavigation.org/docs/troubleshooting/#im-getting-syntaxerror-in-react-navigationxxxxxxtsx-or-syntaxerror-xxxreact-navigationxxxxxxtsx-unexpected-token)
62.Clear cache (https://reactnavigation.org/docs/troubleshooting/#stale-cache-of-metro-bundler)