Skip to content

PowerShell Language Server fails to start due to incorrect path on Windows #16

@vkibalyuk

Description

@vkibalyuk
Log:

2025-06-24T17:49:53+03:00 INFO  [lsp] starting language server process. binary path: "C:\\Program Files\\PowerShell\\7\\pwsh.exe", working directory: "D:\\", args: ["-NoLogo", "-NoProfile", "-Command", "Import-Module ( Join-Path \'/C:\\Users\\dtt\\AppData\\Local\\Zed\\extensions\\work\\powershell/powershell-es-v4.3.0\' \'PowerShellEditorServices/PowerShellEditorServices.psd1\' ); Start-EditorServices -Stdio -SessionDetailsPath \'/C:\\Users\\dtt\\AppData\\Local\\Zed\\extensions\\work\\powershell/powershell-es-v4.3.0/powershell-es.session.json\' -LogPath \'/C:\\Users\\dtt\\AppData\\Local\\Zed\\extensions\\work\\powershell/powershell-es-v4.3.0/logs\' -FeatureFlags @() -AdditionalModules @() -HostName zed -HostProfileId 0 -HostVersion 1.0.0 -LogLevel Trace"]
2025-06-24T17:49:53+03:00 ERROR [lsp] cannot read LSP message headers
2025-06-24T17:49:53+03:00 ERROR [lsp] Server reset connection for a request "initialize" id 0
2025-06-24T17:49:53+03:00 ERROR [project::lsp_store] Failed to start language server "powershell-es": Error {
    context: "initializing server powershell-es, id 11",
    source: "Server reset the connection",
}
2025-06-24T17:49:53+03:00 ERROR [project::lsp_store] server stderr: �[31;1mImport-Module: �[31;1mCannot find drive. A drive with the name '\C' does not exist.�[0m
�[31;1mStart-EditorServices: �[31;1mThe term 'Start-EditorServices' is not recognized as a name of a cmdlet, function, script file, or executable program.�[0m
�[31;1m�[31;1mCheck the spelling of the name, or if a path was included, verify that the path is correct and try again.�[0m

2025-06-24T17:49:53+03:00 ERROR [lsp] server shut down

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions