【发布时间】:2021-03-19 16:10:25
【问题描述】:
我做到了
- 我做了 yarn start 并且
http://localhost:3000/成功了,但是有很多问题 已经出现
$yarn start 还有npm run start
纱线运行 v1.22.4
$ react-scripts 开始
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'.
我试试
这是my repo
我的目标
- 使用 lint a
react-typescript-app
【问题讨论】:
标签: typescript node-modules tsconfig react-typescript