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.

Problems panel lists 4 problems for jsconfig.json in my project

See original GitHub issue

TS Template added by @mjbvz

TypeScript Version: 4.1.5

Search Terms

  • configdiag

  • VS Code Version: 1.53.2
  • OS Version: Windows 10

Steps to Reproduce:

  1. Create a new Gatsby project, or clone from my repo
  2. Open VSCode
  3. Create a new jsconfig.json file if it does not exist
  4. Problems panel will randomly show errors on the jsconfig.json file image

The jsconfig.json file contains this:

{
    "compilerOptions": {
        "module": "commonjs",
        "jsx": "preserve",
        "baseUrl": "./src"
    },
    "include": ["src"],
    "exclude": [
        "node_modules",
        "**/node_modules/*",
        "node_modules/**/*",
        "public"
    ]
}

Does this issue occur when all extensions are disabled?: Yes

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:23 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mjbvzcommented, Feb 17, 2021

Ok, I’ve moved this to typescript to see if they have any insights.

Here’s the relevant diagnostics that are being generated:

Info 269  [02:01:03.214] event:
    {"seq":0,"type":"event","event":"projectLoadingFinish","body":{"projectName":"c:/Users/LewChan/Documents/Projects/reproduce-jsconfig-error/jsconfig.json"}}
Info 270  [02:01:03.230] event:
    {"seq":0,"type":"event","event":"configFileDiag","body":{"triggerFile":"c:/Users/LewChan/Documents/Projects/reproduce-jsconfig-error/jsconfig.json","configFile":"c:/Users/LewChan/Documents/Projects/reproduce-jsconfig-error/jsconfig.json","diagnostics":[{"text":"File 'c:/Users/LewChan/Documents/Projects/reproduce-jsconfig-error/node_modules/defer-to-connect/dist' not found.","code":6053,"category":"error"},{"text":"File 'c:/Users/LewChan/Documents/Projects/reproduce-jsconfig-error/node_modules/dotenv/types' not found.","code":6053,"category":"error"},{"text":"File 'c:/Users/LewChan/Documents/Projects/reproduce-jsconfig-error/node_modules/tsconfig-paths/lib/index' not found.","code":6053,"category":"error"}]}}
0reactions
tunjioyecommented, Oct 31, 2021

@lewisgauss Restart your VS Code after updating the JSON Schema Settings to confirm.

Yeah, I did that, but the error comes back after I add a new JS file.

Okay

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode jsconfig.json error "node_modules/agent-base/dist ...
Try adding "exclude": ["node_modules"] as described in the VSCode docs. I added this and restarted VSCode and the error message went away.
Read more >
jsconfig.json Reference - Visual Studio Code
View the reference for jsconfig.json. ... The file itself can optionally list the files belonging to the project, the files to be excluded...
Read more >
jsconfig.json Problem in a Package Dependency
Both projects were created in VS Code with command SFDX: Create Project. In particular, both projects have the **/.eslintrc.json and **/jsconfig ...
Read more >
jsconfig.json: unexpected token } in json - You.com - You.com
Your jsconfig has a trailing comma after the array value in @components/* . You need to remove it because JSON doesn't support them....
Read more >
How to Set Up VS Code for React Development - SitePoint
After installing the JavaScript language feature, VS Code may prompt you to provide a jsconfig.json file at the root of your project.
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