slint-ui/slint · warning

Could not locate the configured slint-lsp server binary in…

Error message

Could not locate the configured slint-lsp server binary in PATH

What it means

For a relative (non-absolute) slint-lsp binary override, find_lsp_binary joins the configured name against every entry of the PATH environment variable and checks each candidate with existsSync. When no PATH directory contains the binary, it warns 'Could not locate the configured slint-lsp server binary in PATH' and returns undefined. The extension then starts without LSP features.

Solutions

  1. Install slint-lsp into a PATH directory (e.g. cargo install slint-lsp, ensuring ~/.cargo/bin is on PATH)
  2. Add the binary's directory to PATH and restart VS Code from that environment
  3. Change the override setting to an absolute path to bypass PATH lookup
  4. Verify with 'which slint-lsp' (using the same environment VS Code inherits)

Example fix

// shell before
$ export PATH=$PATH:/home/me/slint/target/debug   # binary not there
// after — ensure the directory actually holding slint-lsp is on PATH
$ export PATH=$PATH:/home/me/.cargo/bin && code .
Defensive patterns

Strategy: validation

Validate before calling

function slintLspOnPath(name) {
  return (process.env.PATH ?? '').split(path.delimiter).some(dir => existsSync(path.join(dir, name)));
}
if (!slintLspOnPath('slint-lsp')) console.warn('slint-lsp not on PATH; install with cargo install slint-lsp');

Prevention

When it happens

Trigger: The slint.lsp binary override is a bare command name (e.g. 'slint-lsp') that is not installed in any PATH directory, or the binary was installed into a directory not present in the PATH of the process running VS Code.

Common situations: Installing slint-lsp via cargo install but ~/.cargo/bin missing from the GUI-launched VS Code's PATH; using a custom name for a script that lives outside PATH; PATH differences between terminal and desktop-launched VS Code.

Related errors


AI-assisted analysis of slint-ui/slint@bb937076de (2026-09-16). Data as JSON: /api/errors/6e98534924714ae7. Report an issue: GitHub.

Appendix: source

Thrown at editors/vscode/src/extension.ts:156

    if (path.isAbsolute(lsp_binary_path)) {
        // The slint-lsp override is a absolute path: Look in that path only
        if (existsSync(lsp_binary_path)) {
            return lsp_binary_path;
        }
        console.warn(
            "Could not locate the configured slint-lsp server binary at absolute path",
        );
        return undefined;
    }

    // The slint-lsp override is a relative path: Look relative to PATH
    const path_env = process.env.PATH?.split(path.delimiter).map((p) =>
        path.join(p, lsp_binary_path),
    );

    const serverModule = path_env?.find((path) => existsSync(path));
    if (serverModule === undefined) {
        console.warn(
            "Could not locate the configured slint-lsp server binary in PATH",
        );
    }
    return serverModule;
}

// Please add changes to the BaseLanguageClient via
// `client.add_updater((cl: BaseLanguageClient | null): void)`
//
// That makes sure the code is run even when the LSP gets restarted, etc.
//
// Please add setup common between web and native VSCode by adding updaters
// to the client in common.ts!
function startClient(
    client: common.ClientHandle,
    context: vscode.ExtensionContext,
    telemetryLogger: vscode.TelemetryLogger,
) {

View on GitHub (pinned to bb937076de)