How to fix InvalidAbsFile error from stack build

116 Views Asked by At

I seem to be getting a peculiar problem which is hard to even search up online. I'm using stack and have already created a project from my professor but when I try to run it with stack build or stack run

I get this error:

InvalidAbsFile "C:\\Programs\\Projects\\bimaru2\\\"C:\\Windows\\system32\\ghc-9.0.2.exe"

The error is mentioned here: https://hackage.haskell.org/package/path-0.9.2/docs/Path-Windows.html#v:InvalidAbsFile but this description is not telling me anything. I found someone with a similar problem: InvalidAbsFile error when running "stack" on windows in an existing project. I removed Java but the problem still persists. I tried changing directories and all, so the first path is printed according to where the project is. My version of ghc was 8.10.7 and I reinstalled 9.2.4, so I have no idea where 9.0.2 comes from (nor do I have it in C:\Windows\system32\ directory). This is the second project I get this error with, but the first one I solved by setting system-ghc in stack.yaml file from true to false (although the professor mentioned that then it did not compile for him until he changed it back when we turned in the assignment).

packages:
- .

resolver: lts-18.28
compiler: ghc-8.10.7
compiler-check: match-exact
system-ghc: false
install-ghc: false

I tried the same with this one, but it did not work. If needed, I will provide a link to the github repo where the project is located. I'd be really grateful if you could help me get the project running. Thanks in advance!

0

There are 0 best solutions below