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

Use npx create-react-app App --template typescript to build the project, tsconfig.json file has an error #10107

Closed
HChange opened this issue Nov 20, 2020 · 6 comments

Comments

@HChange
Copy link

HChange commented Nov 20, 2020

image

@HChange
Copy link
Author

HChange commented Nov 20, 2020

Used yarn eject

@robin-xyzt-ai
Copy link

Sounds like a duplicate of #10103

@ChristianIvicevic
Copy link

This is not an error, your VS Code probably hasn't picked up on the new schema for tsconfig.json as react-jsx and react-jsxdev are newly introduced JSX factories starting with Typescript 4.1 and thus valid values in this context. For me personally VS Code doesn't show any error and even offers them during code completion.

@srymh
Copy link

srymh commented Nov 20, 2020

It's resolved in the following way:

  1. "Ctrl + Shift + P" or Click Typescript version at the bottom right of the window.
  2. TypeScript: Select TypeScript Version
  3. Use Workspace Version... 4.1.2

@dylanesque
Copy link

It's resolved in the following way:

  1. "Ctrl + Shift + P" or Click Typescript version at the bottom right of the window.
  2. TypeScript: Select TypeScript Version
  3. Use Workspace Version... 4.1.2

This doesn't work for me

meleu referenced this issue in meleu/github-explorer Nov 26, 2020
@raikusy
Copy link

raikusy commented Nov 27, 2020

For anyone the above solution doesn't work. Try this - #10129 (comment)

Basically you need to install this extension in VSCode - https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next

@HChange HChange closed this as completed Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants