Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Unexpected compiler response: {:error, %CompileError{...}} #284

@petermueller

Description

@petermueller

NextLS Version: 0.13.4, from brew
Transport: TCP
Editor + Version: VSCode, 1.83.1
Elixir Version: 1.13.4 (set globally w/ ASDF as 1.13.4-otp-25)
Erlang/OTP Version: 25.2.3 (set globally w/ ASDF as 25.2.3)
macOS Version + arch: 13.5.2 (Ventura), Intel x86

I'm seeing a compile error related to a private repo dep we have when I open an elixir file for our application

From the logs it seems like it's not because it's private, but just that it's the first dep that is being compiled.

Above the error listed below, I'm seeing tons of run mix deps.get style warnings for standard hex.pm hosted packages too, and I'm positive that my deps are pulled down for the proper version.

I'm also seeing the typical "(Mix) Can't continue due to errors on dependencies", followed by a node down crash

I'm starting vscode from the command line, and have confirmed that asdf is setting Elixir to the same version as my asdf local, just in case maybe nextls was calling elixir from its own directory, or the directory I was running it in (same as the app), and potentially getting missing deps.

[NextLS] ==> my_priv_gh_repo
Error while loading project :my_priv_gh_repo at /Users/peter/code/my_app/deps/my_priv_gh_repo
[Trace - 10:46:51 AM] Received notification 'window/logMessage'.
[Warn  - 10:46:51 AM] [NextLS] Unexpected compiler response: {:error, %CompileError{file: "/Users/peter/code/my_app/deps/my_priv_gh_repo/mix.exs", line: 1, description: "cannot define module MyPrivGhRepo.MixProject because it is currently being defined in /Users/peter/code/my_app/deps/my_priv_gh_repo/mix.exs:1"}}
[Trace - 10:46:51 AM] Received notification '$/progress'.

after enabling verbose, clearing ./.elixir-tools/ and rerunning a little later:

[NextLS] Error while loading project :my_priv_gh_repo at /Users/peter/code/my_app/deps/my_priv_gh_repo
[Trace - 11:41:49 AM] Received notification 'window/logMessage'.
Params: {
    "message": "[NextLS] Unexpected compiler response: {:error, %CompileError{file: \"/Users/peter/code/my_app/deps/my_priv_gh_repo/mix.exs\", line: 1, description: \"cannot define module MyPrivGhRepo.MixProject because it is currently being defined in /Users/peter/code/my_app/deps/my_priv_gh_repo/mix.exs:1\"}}",
    "type": 2
}

If I switch to 1.14+ for asdf global and load up fresh phx.new everything seems to work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions