Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not start Language Server." on nix + direnv #131

Open
yangm97 opened this issue May 14, 2022 · 0 comments
Open

"Could not start Language Server." on nix + direnv #131

yangm97 opened this issue May 14, 2022 · 0 comments

Comments

@yangm97
Copy link

yangm97 commented May 14, 2022

Could not start Language Server. Error: escript: exception error: undefined function erlang_ls:main/1 in function escript:run/2 (escript.erl, line 758) in call from escript:start/1 (escript.erl, line 277) in call from init:start_em/1 in call from init:do_boot/3

Reproducible with:

flake.nix

{
  description = "virtual environments";

  inputs.devshell.url = "github:numtide/devshell";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = { self, flake-utils, devshell, nixpkgs }:
    flake-utils.lib.eachDefaultSystem (system: {
      devShell =
        let pkgs = import nixpkgs {
          inherit system;

          overlays = [ devshell.overlay ];
        };
        in
        pkgs.devshell.mkShell {
          packages = with pkgs; [
            erlangR21
            beam.packages.erlangR21.rebar3
            beam.packages.erlangR21.erlang-ls
          ];
        };
    });
}

.envrc

use flake

Maybe reverting #15 and setting the erlang_ls path to /usr/bin/env erlang_ls would workaround this issue?

obligatory xkcd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant