Skip to content

TypeScript and CSS language server templates are not correct and result in failed startup #1140

Open
@SCWells72

Description

@SCWells72

These user-defined language server templates aren't correct. Let me explain for each in turn...

The TypeScript language server does not start properly when created from the template:

Start server command=$USER_HOME$/.lsp4ij/lsp/typescript-language-server/node_modules/.bin/typescript-language-server.cmd --stdio
com.redhat.devtools.lsp4ij.server.CannotStartProcessException: com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "C:\Users\Scott\.lsp4ij\lsp\typescript-language-server\node_modules\.bin\typescript-language-server.cmd": CreateProcess error=2, The system cannot find the file specified
	at com.redhat.devtools.lsp4ij.server.OSProcessStreamConnectionProvider.start(OSProcessStreamConnectionProvider.java:130)
	at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$start$4(LanguageServerWrapper.java:345)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java)
	at --- Async.Stack.Trace --- (captured by IntelliJ IDEA debugger)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.<init>(CompletableFuture.java:1754)
	at java.base/java.util.concurrent.CompletableFuture.asyncSupplyStage(CompletableFuture.java:1782)
	at java.base/java.util.concurrent.CompletableFuture.supplyAsync(CompletableFuture.java:1989)

In my experience, the correct command to start that language server on Windows is:

npx.cmd typescript-language-server --stdio

and on Mac/Linux it's:

npx typescript-language-server --stdio

Similar with CSS as the template requires VS Code to be installed, but that's not guaranteed to be the case. If instead it just used NPM to install vscode-langservers-extracted, the correct command-line without any other external dependencies would then be:

node C:\Users\Scott\node_modules\vscode-langservers-extracted\lib\css-language-server\node\cssServerMain.js --stdio

Please let me know if that doesn't make sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions