ode_modules/@react-navigation/stack/src/index.tsx: Unexpected token (51:12) 49 | * Types 50 | */ > 51 | export type { | ^ 52 | StackNavigationOptions, 53 | StackNavigationProp, 54 | StackScreenProps, code example
Example 1: unexpected token export type react bottontab navigation
Please refer to below link
https://github.com/react-navigation/react-navigation/issues/7981#issuecomment-611377210
Example 2: unexpected token react native stack navigation
Delete your yarn.lock/package-json.lock file and run yarn/npm install.
Then try clearing cache with npx react-native start --reset-cache/expo start -c
1.Upgrade deps (https://reactnavigation.org/docs/troubleshooting/#im-getting-syntaxerror-in-react-navigationxxxxxxtsx-or-syntaxerror-xxxreact-navigationxxxxxxtsx-unexpected-token)
2.Clear cache (https://reactnavigation.org/docs/troubleshooting/#stale-cache-of-metro-bundler)