我使用的是2.x
的react-navigation
版本,现在我要迁移到5.x
的版本。我已经根据文档安装了所有模块,但是在运行该应用程序时,出现此错误。
它似乎更像是一个打字稿编译错误,但我不确定为什么会出现,因为我只运行了npm install
命令,却没有碰到任何node_module
文件。
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,
你有什么建议?