microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.13k stars 29.27k forks source link

Cannot load package.json schema #185964

Closed crystalfp closed 1 year ago

crystalfp commented 1 year ago

Type: Bug

This happens only in one new workspace. Showing in VC the following package.json file:

{
  "name": "check-md-database",
  "version": "1.17.1",
  "description": "Check format of files to be loaded",
  "exports": "./check.js",
  "type": "module",
  "private": true,
  "engines": {
    "node": ">=18"
  },
  "scripts": {
    "start": "node check.js",
    "lint": "npx eslint -c ../server/eslint.yaml --color -f codeframe --parser-options \"{project: './tsconfig.json'}\" --env node check.ts"
  },
  "author": "Mario Valle",
  "license": "ISC",
  "dependencies": {
    "axios": "^1.4.0",
    "commander": "^11.0.0",
    "http-status-codes": "^2.2.0",
    "is-utf8": "^0.2.1",
    "js-yaml": "^4.1.0"
  },
  "devDependencies": {
    "@types/is-utf8": "^0.2.1",
    "@types/js-yaml": "^4.0.5",
    "@types/node": "^20.3.1",
    "@typescript-eslint/eslint-plugin": "^5.60.0",
    "@typescript-eslint/parser": "^5.60.0",
    "acorn": "^8.9.0",
    "eslint": "^8.43.0",
    "eslint-formatter-codeframe": "^7.32.1",
    "eslint-import-resolver-typescript": "^3.5.5",
    "eslint-plugin-const-case": "^1.2.2",
    "eslint-plugin-dollar-sign": "^1.0.2",
    "eslint-plugin-eslint-comments": "^3.2.0",
    "eslint-plugin-import": "^2.27.5",
    "eslint-plugin-jquery": "^1.5.1",
    "eslint-plugin-no-useless-assign": "^1.0.3",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-optimize-regex": "^1.2.1",
    "eslint-plugin-promise": "^6.1.1",
    "eslint-plugin-requirejs": "^4.0.1",
    "jest": "^29.5.0",
    "typescript": "^5.1.3"
  }
}

Raise the error: "Problems loading reference 'vscode://schemas/settings/configurationDefaults': Unable to load schema from 'vscode://schemas/settings/configurationDefaults': cannot open vscode://schemas/settings/configurationDefaults. Detail: Unable to resolve text model content for resource vscode://schemas/settings/configurationDefaults."

VS Code version: Code 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06, 2023-06-14T08:57:04.379Z) OS version: Windows_NT x64 10.0.22621 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2592)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.77GB (11.39GB free)| |Process Argv|D:\\Projects\\VUEIdeaIgniterEnvironment\\client\\Vite-client-iie.code-workspace --crash-reporter-id df3b806e-c371-4e03-89b8-d13088946634| |Screen Reader|no| |VM|0%|
Extensions (69) Extension|Author (truncated)|Version ---|---|--- vscode-openapi|42C|4.18.2 Bookmarks|ale|13.3.1 appmap|app|0.89.1 vscode-file-templates|bam|1.1.0 spellright|ban|3.0.116 github-markdown-preview|bie|0.3.0 markdown-footnotes|bie|0.1.1 markdown-mermaid|bie|1.19.0 markdown-yaml-preamble|bie|0.1.0 vscode-toggle-quotes|Bri|0.3.6 vscode-pandoc|Chr|0.4.3 refactorix|chr|0.3.7 markdown-word-count|Cur|0.0.6 vscode-eslint|dba|2.4.2 eslint-disable-snippets|drK|1.3.0 gitlens|eam|14.0.1 vscode-great-icons|emm|2.1.93 restore-terminals|Eth|1.1.8 vscode-todo-plus|fab|4.19.1 auto-close-tag|for|0.5.14 todo-tree|Gru|0.0.226 plantuml|jeb|2.17.5 code-eol|jef|1.0.12 vscode-peacock|joh|4.2.2 jsdoc-generator|kim|0.0.4 tag-rename|kri|0.2.1 stack-tabs|kyl|0.0.2 git-graph|mhu|1.30.0 prettify-json|moh|0.0.3 tab-cycle|mpo|1.0.1 isort|ms-|2022.8.0 python|ms-|2023.10.1 vscode-pylance|ms-|2023.6.30 jupyter|ms-|2023.5.1101742258 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.15 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 hexeditor|ms-|1.9.11 notepadplusplus-keybindings|ms-|1.0.7 color-highlight|nau|2.5.0 gremlins|nho|0.26.0 abracadabra|nic|8.1.1 pandocciter|not|0.10.2 leaper|Onl|0.10.5 vscode-jscpd|pau|0.3.4 bib|phr|0.3.0 git-file-history|pom|1.0.1 vscode-thunder-client|ran|2.7.7 vscode-yaml|red|1.13.0 pandoc-markdown|rso|0.1.2 vscode-javascript-booster|sbu|14.0.1 trailing-spaces|sha|0.4.1 markdown-preview-enhanced|shd|0.6.8 vscode-scss-formatter|sib|2.5.0 stardog-rdf-grammars|sta|0.2.1 code-spell-checker|str|2.20.5 code-spell-checker-italian|str|1.0.2 unique-window-colors|stu|1.0.51 vscode-stylelint|sty|1.2.4 sass-indented|syl|1.8.26 open-in-browser|tec|2.0.0 highlight-matching-tag|vin|0.11.0 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 change-case|wma|1.0.0 JavaScriptSnippets|xab|1.8.0 pretty-ts-errors|yoa|0.4.1 markdown-all-in-one|yzh|3.5.1 (1 theme extensions excluded)
crystalfp commented 1 year ago

Seems a duplicated of #177142 . Closing the package.json file obviously dismisses the error, but reopening / restarting VC does not solve the problem.

crystalfp commented 1 year ago

Very speedy solution (seems). There was defined in user configuration: "vue.codeActions.savingTimeLimit": 3000, and this workspace has no vue extension enabled. Moved the line to the right workspace, no more error.