Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

@react-navigation/native upgrade to V5 SyntaxError

$
0
0

I am having some trouble with upgrading my react-navigation from v3 to v5. I keep running into this error, at first I thought it was a bug but I am not finding any other complaints online about it. To be 100% sure the old versions weren't causing any issues, I completely uninstalled all react-navigation and started from scratch with v5. I am still getting an error with the index file. It doesn't appear to understand the typescript...is this a known bug? Is there another step I need to take that is not in the documentation about installing Typescript?

UPDATE:./types files is not compiling correctly...it doesn't seem to recognize NavigationState or ActionHelpers...is this a bug? Has anyone seen this before?

UPDATE 2i am running on RN V0.59 so I am thinking there could be a dependency issue. I am upgrading to V0.62.2 and seeing if the issue persists

enter image description here

https://reactnavigation.org/docs/getting-started

enter image description here

SyntaxError: /Users/myusername/myprojectname/node_modules/@react-navigation/stack/src/index.tsx: Unexpected token (51:12)

49 | * Types 50 | */

51 | export type { | ^ 52 | StackNavigationOptions, 53 | StackNavigationProp, 54 | StackHeaderProps,


Viewing all articles
Browse latest Browse all 6211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>