Reputation: 111
I'm working on an Angular front end in Visual Studio Code for an app with a C# windows service back end. After spending a few days on the back end without touching the front end, I found that Visual Studio Code would no longer automatically recompile my typescript code every time I saved. Instead, I would have to ctrl+c out of the process and run "npm start" again.
I ensured that compileOnSave was set to true in my tsconfig.json. In doing so, I notice a warning:
Problems loading reference 'http://json.schemastore.org/tsconfig': Unable to load schema from 'http://json.schemastore.org/tsconfig': Unable to to connect to http://json.schemastore.org/tsconfig. Error: getaddrinfo ENOTFOUND json.schemastore.org json.schemastore.org:80
I noticed a similar warning for packages.json. I'm able to load the schema on the links on Google Chrome.
What could be a possible fix? Could I download the schema and load it in Visual Studio Code manually?
Upvotes: 8
Views: 22063
Reputation: 41
just follow these simple steps
This worked for me.
Upvotes: 4
Reputation: 737
Seems a network issue for me. When I set Http: proxy
correctly it disappeared and json schema
works well.
Go to "Settings" > "JSON" > "Schema Download" and disabled it.
That's worked for me.
Upvotes: 5
Reputation: 81
For me it wasn't the proxy blocking, but trusted domain list in VSCode.
Go to "Manage trusted domains" on Command Palette and add required url. Here we can add "http://json.schemastore.org"
This is whitelist for VSCode, as a security feature, stopping it running code from anywhere from internet.
Upvotes: 8
Reputation: 111
The solution, as pointed out by @Matt Bierner in the comment above, is to set the "$schema"
key to direct to a local schema file (which can be downloaded from the address in the error).
The problem seems to be caused by a web proxy. Why it showed up now is still unknown.
Upvotes: 3