slint-ui/slint · warning
Could not locate slint-lsp server binary, neither in…
Error message
Could not locate slint-lsp server binary, neither in bundled bin/ directory nor relative in ../target
What it means
The Slint VS Code extension's find_lsp_binary searches for the slint-lsp server binary in the bundled bin/ directory (platform-specific program_name) and then relative to ../target. This warning is emitted when none of those search paths exist, and the function returns undefined, so the language server cannot be started. The extension logs it instead of throwing so VS Code can surface that no LSP features will work.
Solutions
- Build the LSP server: cargo build -p slint-lsp (so ../target contains slint-lsp)
- Place the platform binary at <extensionPath>/bin/<program_name> (bundled installs)
- Set the slint.lsp binary path override setting to an existing absolute or PATH-visible binary
- Reinstall the official extension package which bundles the correct binary for your platform
Defensive patterns
Strategy: fallback
Validate before calling
const candidates = [path.join(extPath, 'bin', 'slint-lsp'), path.join(extPath, '..', 'target', 'debug', 'slint-lsp')];
if (!candidates.some(existsSync)) console.warn('slint-lsp not built; run cargo build -p slint-lsp'); Prevention
- Run cargo build -p slint-lsp before launching the extension in dev mode
- Verify bin/ bundling in your packaging/CI step for each platform
- Configure the slint.lsp binary override during development
- Check the extension host log for this warning right after activation
When it happens
Trigger: Activating the extension with neither a bundled binary at <extensionPath>/bin/<program_name> nor a build artifact at ../target/**/slint-lsp present; developing the extension from source without having built the LSP server; a platform whose program_name binary was not bundled at package time.
Common situations: Running the extension via 'Run Extension' in dev mode before running cargo build; installing a dev/nightly VSIX that skipped bundling; cloning a fresh checkout where ../target does not exist yet.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Could not locate the configured slint-lsp server binary at…
- Could not locate the configured slint-lsp server binary in…
- Callbacks were set up earlier
- Child has no stdin
- Child has no stdout
AI-assisted analysis of slint-ui/slint@bb937076de (2026-09-16).
Data as JSON: /api/errors/f3ade94efe8a0f65.
Report an issue: GitHub.
Appendix: source
Thrown at editors/vscode/src/extension.ts:131
context.extensionPath,
"..",
"..",
"target",
"release",
"slint-lsp" + program_extension,
),
path.join(
context.extensionPath,
"bin",
"slint-lsp" + program_extension,
),
path.join(context.extensionPath, "bin", lsp_platform.program_name),
];
const serverModule = lspSearchPaths.find((path) => existsSync(path));
if (serverModule === undefined) {
console.warn(
"Could not locate slint-lsp server binary, neither in bundled bin/ directory nor relative in ../target",
);
}
return serverModule;
}
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 PATHView on GitHub (pinned to bb937076de)