lexical-lsp / vscode-lexical

VSCode extension for Lexical, the modern Elixir language server
Apache License 2.0
36 stars 6 forks source link

Failed to start Lexical: Error: spawn UNKNOWN #74

Closed Frid-Yuandu closed 6 months ago

Frid-Yuandu commented 6 months ago

Description: I built lexical from source code then try to start it, but got this error:

Error: spawn UNKNOWN
    at ChildProcess.spawn (node:internal/child_process:413:11)
    at Object.spawn (node:child_process:795:9)
    at path\to\.vscode\extensions\lexical-lsp.lexical-0.0.14\out\main.js:49:19271
    at async hh.createConnection (path\to\.vscode\extensions\lexical-lsp.lexical-0.0.14\out\main.js:46:12504)
    at async hh.start (path\to\.vscode\extensions\lexical-lsp.lexical-0.0.14\out\main.js:46:2730)
    at async IF (path\to\.vscode\extensions\lexical-lsp.lexical-0.0.14\out\main.js:55:21258)
    at async PF (path\to\.vscode\extensions\lexical-lsp.lexical-0.0.14\out\main.js:55:20081)
    at async u.n (c:\Applications\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:6255)
    at async u.m (c:\Applications\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:6218)
    at async u.l (c:\Applications\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:5675)

It seems a javascript-related issue, but i don't know how to fix it.

Environment: My Elixir & Erlang version is:

Elixir: 1.15.7
Erlang: 25.3.2.8

My Vs Code version is: 1.87.2, and using the latest version of the lexical plug 0.0.14.

Blond11516 commented 6 months ago

Hi @Frid-Yuandu! I'm not sure what could cause this. Does Lexical start correctly if you use the package installed by the extension instead of building from source? You can test this by commenting out the lexical.server.releasePathOverride option in your settings.

Frid-Yuandu commented 6 months ago

Thank you for your reply! I tried what you said, but unfortunately, this method didn't work. The extension successfully downloaded the package Downloading lexical archive from github with path "https://github.com/lexical-lsp/lexical/releases/download/v0.5.2/lexical.zip",but still got the same error.

Actually, this error had been encountered since several months ago, with lexical-0.4.1 and vscode-lexical-0.0.11.

I'll try it in Linux later.

Blond11516 commented 6 months ago

I'll try it in Linux later.

I see from the paths in the stack trace that you appear to be using Windows? If so, that's most likely why it doesn't work. Lexical (the language server nor the extension) doesn't support Windows right now.

It should work with WSL though, not sure from the stack trace whether or not you're using it.

Frid-Yuandu commented 6 months ago

(the language server nor the extension) doesn't support Windows right now.

I see, I do use Windows. I tried in Linux, and it works well :).