我做了
http://localhost:3000/
很成功,但是出现了很多问题$ yarn start
也是npm run start
纱线运行版本1.22.4$react脚本启动
The following changes are being made to your tsconfig.json file:
- compilerOptions.jsx must be react-jsx (to support the new JSX transform in React 17)
i 「wds」: Project is running at http://192.168.56.1/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from C:\Users\taiga\Github\Typescript\eslint-app\example\public
i 「wds」: 404s will fallback to /
Starting the development server...
Compiled successfully!
You can now view example in the browser.
Local: http://localhost:3000
On Your Network: http://192.168.56.1:3000
Note that the development build is not optimized.
To create a production build, use npm run build.
错误
Cannot use JSX unless the '--jsx' flag is provided
Module './App' was resolved to 'c:/Users/taiga/Github/Typescript/eslint-app/example/src/App.tsx', but '--jsx' is not set.
Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.
我试着
我是我的回购
我的目标
react-typescript-app
发布于 2021-05-10 08:32:53
这是一个与创建-反应-应用程序(CRA)脚本悬而未决的问题。唯一适合我的解决方案是在.env
文件中添加下面的配置(在项目根目录中)。
DISABLE_NEW_JSX_TRANSFORM=true
https://stackoverflow.com/questions/65197219
复制相似问题