6

I set up a normal create-react-app project and add jsconfig.json to the root directory. But it shows the error which is typescript related. problems in Vscode terminal Here is the jsconfig.json file

jsconfig.json configurations

Folder structure

enter image description here

Can anyone help me with this?

Thanks, Prakhil

2
  • @Supercool. I think It is not the problem with the exclude property, I've confirmed it. The documentation says, If IntelliSense is slow, add folders to your exclude list Commented Apr 18, 2020 at 10:04
  • I've added the same jsconfig.json to my CRA and no problem at all. Commented Apr 18, 2020 at 10:28

2 Answers 2

12

Open the settings.json file, add the below line and then save.

 "json.schemas": [
      { 
        "$schema": "https://json.schemastore.org/jsconfig" 
      }
    ]

enter image description here

Sign up to request clarification or add additional context in comments.

4 Comments

I have this exact problem with my nuxt app, Any suggestions?
Didn't it work after adding the line on to settings.json? You may have to restart the vscode to get things effective.
Turns out it was webpack bundle that made the code crush, after removing it, the app works as expected
I had the same error and tried the above. Restarted VS code and it did not work.
1

I had a similar error and solved it by changing the extension of the jsconfig.json file to jsconfig.jsonc

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.