language-tools: Receiving error "Vue Semantic Server client: couldn't create connection to server." since upgrading to 1.0.0

Hi,

Since VSC upgraded to Volar to 1.0.0 automatically this afternoon I am getting errors when loading .vue files.

image

The output window for the Vue Semantic Server shows the following errors repeatedly:

[Error - 16:15:48] Server initialization failed.
  Message: Request initialize failed with message: Cannot read properties of undefined (reading 'createLanguageService')
  Code: -32603 
[Error - 16:15:48] Vue Semantic Server client: couldn't create connection to server.
  Message: Request initialize failed with message: Cannot read properties of undefined (reading 'createLanguageService')
  Code: -32603 
[Info  - 16:15:50] Connection to server got closed. Server will restart.

The output window for the Vue Syntactic Server shows the following errors repeatedly:

[Error - 16:15:48] Server initialization failed.
  Message: Request initialize failed with message: Cannot read properties of undefined (reading 'createLanguageService')
  Code: -32603 
[Error - 16:15:48] Vue Syntactic Server client: couldn't create connection to server.
  Message: Request initialize failed with message: Cannot read properties of undefined (reading 'createLanguageService')
  Code: -32603 
[Info  - 16:15:50] Connection to server got closed. Server will restart.

I have downgraded to Volar 0.4 and that has resolved the issue for the time being.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 25 (6 by maintainers)

Most upvoted comments

Please update your extension to v1.4.3 or later, and please don’t reply on an obsolete issue.

@johnsoncodehk Thanks, I see this is resolved in v1.4.3. I wouldn’t call it “replying to an obsolete issue” since this was happening as of v1.4.2 and x.x.3 was only published 11 hours ago 🙂. Thanks

Sorry to bother you all, but this problem has prevented me from using vscode to write vue projects, and using the above method has not solved the error and plugin failure.

I agree, unfortunately, it happened to be the only related issue with the most engagement and most recent comment. Thanks again.

Same problem, I think this must have happened with an update as it only started yesterday. When I check the output I see:

Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in ms-vscode.vscode-typescript-next

So what this tells me is that this problem has something to do with the Microsoft official typescript extension. What to do?, Here’s some solution that’ll work. Open your extension list and disable this extension for your workspace.

CleanShot 2023-04-22 at 12 26 24@2x

Alternatively, install a different version of the extension.

CleanShot 2023-04-22 at 12 28 18@2x

However, for me, it only worked after disabling the extension. I guess there might be some incompatibility with Volar and vscode-typescript-next recent changes.

@johnsoncodehk That’s fixed it. I changed to “Use Workspace Version 4.8.4”, note of interest switching back to “Use VC Code’s Version” also works.

image

Failing

In my case above it was about the path pointing to a file rather than the lib dir. You’ve masked yours in the failing case so hard to tell whether it’s the same issue.

Also I guess make sure that the directory and files within it do exist.

It seems a same problem: https://github.com/johnsoncodehk/volar/issues/1880#issuecomment-1266312500

But I don’t know how it resolve, can you try reinstall extension and restart vscode?