Rust-analyzer: Launching server using command ra_lsp_server failed.

Created on 15 Jul 2019  路  4Comments  路  Source: rust-analyzer/rust-analyzer

The current git version does not start:

[Error - 7:11:06 PM] Starting client failed
Launching server using command ra_lsp_server failed.

Plugin was installed without errors:

> cargo install-code
    Finished dev [unoptimized + debuginfo] target(s) in 0.37s
     Running `target/debug/ra_tools install-code`

will run: cargo install --path crates/ra_lsp_server --force
  Installing ra_lsp_server v0.1.0 (/home/razr/rust-analyzer/crates/ra_lsp_server)
    Updating crates.io index
    Updating git repository `https://github.com/rust-lang/chalk.git`
    Finished release [optimized + debuginfo] target(s) in 1.91s
   Replacing /home/razr/.cargo/bin/ra_lsp_server
    Replaced package `ra_lsp_server v0.1.0 (/home/razr/rust-analyzer/crates/ra_lsp_server)` with `ra_lsp_server v0.1.0 (/home/razr/rust-analyzer/crates/ra_lsp_server)` (executable `ra_lsp_server`)

will run: npm ci
npm WARN prepare removing existing node_modules/ before installation

> [email protected] postinstall /home/razr/rust-analyzer/editors/code
> node ./node_modules/vscode/bin/install

Detected VS Code engine version: ^1.33.0
Found minimal version that qualifies engine range: 1.33.0
Fetching vscode.d.ts from: https://raw.githubusercontent.com/Microsoft/vscode/0dd516dd412d42323fc3464531b1c715d51c4c1a/src/vs/vscode.d.ts
vscode.d.ts successfully installed!

added 168 packages in 5.632s

will run: npm run package

> [email protected] package /home/razr/rust-analyzer/editors/code
> vsce package

Executing prepublish script 'npm run vscode:prepublish'...

> [email protected] vscode:prepublish /home/razr/rust-analyzer/editors/code
> npm run compile


> [email protected] compile /home/razr/rust-analyzer/editors/code
> tsc -p ./ && shx cp src/utils/terminateProcess.sh out/utils/terminateProcess.sh

This extension consists of 193 separate files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension. You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore
 DONE  Packaged: /home/razr/rust-analyzer/editors/code/ra-lsp-0.0.1.vsix (193 files, 342.29KB)
 WARNING  
The latest version of vsce is 1.65.0 and you have 1.64.0.
Update it now: npm install -g vsce

will run: code --install-extension ./ra-lsp-0.0.1.vsix --force
Installing extensions...
Extension 'ra-lsp-0.0.1.vsix' was successfully installed.

will run: code --list-extensions

I've also tried to install it manually.

Rust 1.36.0
VSCode 1.36.1 (clean instalation)
nodejs 11.14.0

Most helpful comment

It's not VSCode, it's your DE, which has no obligation to spawn a shell. You can:

  • add ~/.cargo/bin to PATH in your ~/.pam_environment (PATH DEFAULT=${PATH}:@{HOME}/.cargo/bin) or /etc/environment
  • set the full path in the RA Code extension setting
  • make a symlink under /usr/local/bin

All 4 comments

Does it work with PATH=~/.cargo/bin:$PATH code?

Yes, my bad. Looks like VSCode ignores .profile for some reasons.

It's not VSCode, it's your DE, which has no obligation to spawn a shell. You can:

  • add ~/.cargo/bin to PATH in your ~/.pam_environment (PATH DEFAULT=${PATH}:@{HOME}/.cargo/bin) or /etc/environment
  • set the full path in the RA Code extension setting
  • make a symlink under /usr/local/bin

@matklad long-term the extension should probably bundle or download the RA binary like other Code extensions do, but that makes development more awkward. Maybe there should be a notice about this somewhere, as it seems that a lot of people get bitten by it.

Was this page helpful?
0 / 5 - 0 ratings