VSCode Haskell Extension Error: `ghcup --no-verbose upgrade` exited with exit code ENOENT

818 Views Asked by At

When opening a Haskell file with VSCodium (I don't think that makes a difference), I get the error `ghcup --no-verbose upgrade` exited with exit code ENOENT.

Here's the full log from the Extension Output:

[client] INFO Finding haskell-language-server
[client] INFO Checking for ghcup installation
[client] INFO found ghcup at ghcup
[client] INFO Executing 'ghcup --no-verbose upgrade' in cwd '/home/lonelyfloat'
[client] ERROR Error executing 'ghcup --no-verbose upgrade' with error code ENOENT
[client] ERROR stderr: 
[client] ERROR Error executing 'ghcup --no-verbose upgrade': name = Error, message = spawn ghcup ENOENT
[client] ERROR Internal Error: `ghcup --no-verbose upgrade` exited with exit code ENOENT.
                              Consult the [Extensions Output](https://github.com/haskell/vscode-haskell#investigating-and-reporting-problems)
                              for details.
[client] ERROR Error: `ghcup --no-verbose upgrade` exited with exit code ENOENT.
                              Consult the [Extensions Output](https://github.com/haskell/vscode-haskell#investigating-and-reporting-problems)
                              for details.

When I just run ghcup --no-verbose upgrade in the terminal, I just get a warning saying that GHCup is up to date.

1

There are 1 best solutions below

0
On

In my case, it was the PATH problem as explained here https://githubmemory.com/repo/haskell/vscode-haskell/issues/581

Quitting the vscode completely and then re-opening it fixed the issue.