typescript-language-server / typescript-language-server

TypeScript & JavaScript Language Server

Home Page:https://www.npmjs.com/package/typescript-language-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to initialize, language server cannot read properties of undefined (reading 'workspace')

chenzhf2019 opened this issue · comments

This is my initialize request, I don't know why it can't run, please help me
image
image

{\n "jsonrpc": "2.0",\n "id": 0,\n "method": "initialize",\n "params": {\n "processId": 28292,\n "clientInfo": {\n "name": "CodeAnalysisTools",\n "version": "2.0"\n },\n "rootUri": "file:///C%3A/Users/czf/Desktop/workspace/demo",\n "rootPath": "file:///C%3A/Users/czf/Desktop/workspace/demo",\n "workspaceFolders":{\n "uri": "file:///C%3A/Users/czf/Desktop/workspace/demo",\n "name": "czf"\n },\n "trace": "on"\n }\n }

If you want to use the server manually instead of using it from within an editor that already implements an LSP support then you need to read and follow the LSP specification. In this case you are missing the capabilities object, for example.