Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible TypeScript version in package.json #10150

Closed
rafgraph opened this issue Nov 25, 2020 · 6 comments
Closed

Incompatible TypeScript version in package.json #10150

rafgraph opened this issue Nov 25, 2020 · 6 comments

Comments

@rafgraph
Copy link
Contributor

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"

@lfoliveir4
Copy link

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

@Poolshark
Copy link

Unfortunately this did not solve it for me. Anything else I could try?

@rafgraph
Copy link
Contributor Author

rafgraph commented Nov 29, 2020

@Poolshark see #10144 (comment)

You might need to manually select the workspace version of TS

@Poolshark
Copy link

Sorry for the supposedly stupid question but how do I do that?

@rafgraph
Copy link
Contributor Author

It’s explained in #10144 (comment)

@rafgraph
Copy link
Contributor Author

Fixed in CRA v4.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants