question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatible TypeScript version in package.json

See original GitHub issue

The 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:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lfoliveir4commented, Nov 25, 2020

@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!!!

0reactions
rafgraphcommented, Feb 10, 2021

Fixed in CRA v4.0.2

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found