Reputation: 21779
I am getting a strange error in my VSCode as follows.
file: 'file:///d%3A/SVenu/FullStackDevelopment/ProjectCode_Skeleton_University_ERP_v2/assoc/package.json' severity: 'Warning' message: 'Problems loading reference 'http://json.schemastore.org/package': Unable to load schema from 'http://json.schemastore.org/package': Unable to to connect to http://json.schemastore.org/package. Error: connect ECONNREFUSED 137.117.17.70:80' at: '1,1' source: ''
Can anyone please let me know what would be the cause for this issue?
Here is my package.json file content.
{
"name": "Server",
"version": "1.0.0",
"description": "Server",
"main": "server.js",
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "git"
},
"keywords": [
"Server"
],
"dependencies": {
"body-parser": "^1.12.4",
"cors": "^2.7.1",
"express": "^4.11.0",
"http-status": "^0.2.0",
"mongoose": "^4.4.12"
},
"devDependencies": {
"chai": "^4.1.2",
"mocha": "^4.0.1"
}
}
Upvotes: 5
Views: 18260
Reputation: 284
Your VSCode cannot connect to schema (mentioned in error log) for some reason. I had the same problem (due to blocked internet access at my remote machine) and found description here.
My solution was to edit User settings (File > Preferences > Settings) to manually define schema for package.json
which will override the default path to corresponding schema. So you can basically just add the following field to the User settings:
"json.schemas": [
{
"fileMatch": [
"/package.json"
],
"url": "../../way/to/schema/package.json"
},
You can get the file with schema from the link you mentioned or somewhere else.
And don't forget to re-open the project after you've changed the settings.
I hope this trick will help you or anyone else facing such problem.
Upvotes: 0
Reputation: 155
My problem Occurred due to internet connection issue while loading project so when my internet got stable Simply restarted compiler in which project was being run and it solved the issue. Hope it helped :)
Upvotes: 1