vetur icon indicating copy to clipboard operation
vetur copied to clipboard

Request textDocument/documentSymbol failed with message: Cannot set property createLanguageServiceSourceFile of #<Object> which has only a getter

Open alexcroox opened this issue 1 year ago • 1 comments

  • [x] I have searched through existing issues
  • [x] I have read through docs
  • [x] I have read FAQ
  • [x] I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: macOS
  • Vetur version: 0.37.3
  • VS Code version: Version: 1.79.2 (Universal)
  • TypeScript version:
  • Vetur output:

<!-- Run VSCode command `Vetur: Show output panel` -->
- Vetur doctor output
Doctor output

Vetur initialized
[INFO ] Find node_modules paths in /Users/alex/Projects/exchange - 295ms
[INFO ] Loaded [email protected] from /Users/alex/Projects/exchange/node_modules/typescript.
[INFO ] Loaded [email protected] from /Users/alex/Projects/exchange/node_modules/prettier.
[INFO ] Loaded bundled @starptech/prettyhtml.
[INFO ] Loaded bundled prettier-eslint.
[INFO ] Loaded bundled prettier-tslint.
[INFO ] Loaded bundled stylus-supremacy.
[INFO ] Loaded bundled @prettier/plugin-pug.
[Error - 08:53:12] Request textDocument/documentSymbol failed.
  Message: Request textDocument/documentSymbol failed with message: Cannot set property createLanguageServiceSourceFile of #<Object> which has only a getter
  Code: -32603 

Problem

Not sure if it's a recent version of VSCode but saving .vue (2) files hangs forever trying to format them and I see the above error in the output of Vue Language Server panel. No amount of restarting has resolved it.

It also seems to be forever trying to load the project

image

alexcroox avatar Jul 12 '23 07:07 alexcroox

@alexcroox for me it was because i was using typescript 5.x which does not seem to be compatible with vetur

farfromrefug avatar Nov 08 '23 14:11 farfromrefug