Incompatible TypeScript version in package.json
See original GitHub issueThe minimum TS version listed in package.json
when creating a new CRA project is 4.0.3, which not compatible with the new JSX transform and the included tsconfig.json
setting "jsx": "react-jsx"
This is ultimately the root cause behind #10144 because when package.json
lists a compatible TS version, VS Code knows not to use an incompatible version.
Solution: change the TS version in newly created CRA projects to "typescript": "^4.1.2"
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Error about unsupported TS version while project is using ...
Our package.json shows typescript version as “typescript”: ... Error about unsupported TS version while project is using supported version.
Read more >How to get the version from the package.json in Typescript?
The way I like to do this without requiring webpack or any other dependencies is to add a prebuild script to package.json that...
Read more >Semver explained - why is there a caret (^) in my package.json?
Semantic Versioning uses three-part version number. The basic contract for the module maintainer making changes is. backward-incompatible change increments the ...
Read more >Getting Started - ESBuild
This setting also disables the interpretation of the browser field in package.json . If your code uses newer JavaScript syntax that doesn't work...
Read more >@types/node - npm
TypeScript definitions for Node.js. Latest version: 18.11.18, last published: 2 days ago. Start using @types/node in your project by running ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rafgraph This is solved to me. I started a project and found the same problem as you. I just upgraded the typescript as mentioned and it worked 100% for me, clearing all compilation errors and the new jsx-transform is also working.
Thanks!!!
Fixed in CRA
v4.0.2