Issue
I was using version 2.x
of react-navigation
, now I'm migrating to version 5.x
. I have installed all modules according to the documentation, but on running the application, I get this error.
It seems more like a typescript compilation error, but I'm not sure why it appeared, as I simply ran npm install
command and have not touched any node_module
files.
error: SyntaxError: E:\PROJECTS\rnzone\BoxApp\node_modules\@react-navigation\stack\src\index.tsx: Unexpected token (51:12)
49 | * Types
50 | */
> 51 | export type {
| ^
52 | StackNavigationOptions,
53 | StackNavigationProp,
54 | StackHeaderProps,
What do you suggest?
Solution
So I was able to solve this by upgrading @babel/core
and @babel/runtime
in dev dependencies.
Support for type-only imports + exports was added in 7.9.0
Thanks to nickyleach for pointing this out.
Answered By - Abhishek Kumawat
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.