我一直在使用 Mono 存储库与 React 应用程序共享 React Native 组件。当我尝试使用 React 中的 React Native 组件时,它一直显示一个我无法解决的错误。
我尝试按照说明进行操作,例如将 @babel/preset-flow 添加到预设中。但是,还是没有用。请帮帮我。
请看看我遇到的错误:
5 |
6 | /* eslint-disable-next-line */
> 7 | export interface TestingProps {
| ^
8 | }
9 |
10 |
Add @babel/preset-flow (https://github.com/babel/babel/tree/main/packages/babel-preset-flow) to the 'presets' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-flow (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow) to the 'plugins' section to enable parsing.
at instantiate (D:\workStation\Stacks\TurboRepoCrossPlatform\master\node_modules\@babel\parser\lib\index.js:67:32)
at constructor (D:\workStation\Stacks\TurboRepoCrossPlatform\master\node_modules\@babel\parser\lib\index.js:364:12)
at Parser.raise (D:\workStation\Stacks\TurboRepoCrossPlatform\master\node_modules\@babel\parser\lib\index.js:3365:19) …Run Code Online (Sandbox Code Playgroud)