1

If I have vscode open for several hours but remain offline, it seems the schema cache automatically clears and I get errors like this:

Problems loading reference 'https://json.schemastore.org/tsconfig': Unable to load schema from 'https://json.schemastore.org/tsconfig': getaddrinfo EAI_AGAIN json.schemastore.org.

Is there a way to PREVENT schema cache from being cleared when offline? Two specific situations are

  • vscode is open throughout the transition from online to offline
  • vscode is opened while offline

I know it could be done manually (c.f. this answer), e.g., by copying a a version for offline use and specifying in settings.json

    "json.schemas": [
      {
        "fileMatch": [
          "tsconfig.json"
        ],
        "url": "./tsconfig.schema.json"
      }
    ],

but of course I'd rather the existing schema cache feature worked sensibly - and maybe it does but requires a switch to do so?

Craig Hicks
  • 2,199
  • 20
  • 35

0 Answers0