Visual Studio Code - Type Script - Unable to load tsconfig.json and packages.json schemas

I am working on an Angular frontend in Visual Studio Code for a C # Windows Service backend application. After spending a few days on the back end without touching the front, I found that Visual Studio Code would no longer automatically recompile my typescript code every time I save. Instead, I would have to ctrl + c to quit the process and run "npm start" again.

I have ensured that the compileOnSave is set to true in my tsconfig.json. That being said, I warn you:

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 can download the diagram from the links in Google Chrome.

What could be a possible solution? Can I upload a schema and load it into Visual Studio Code manually?

+3


source to share


1 answer


The solution, as pointed out in a comment by @Matt Bierner in the comment above, is to set the key "$schema"

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 he appeared now is still unknown.

+1


source







All Articles