nimlsp icon indicating copy to clipboard operation
nimlsp copied to clipboard

[Resolution]: Installation issues on macOS: Error: invalid indentation in ast_pattern_matching.nim

Open levinotik opened this issue 2 years ago • 2 comments

OS: macOS 13.5.1
Nim Compiler Version 2.0.0 [MacOSX: amd64]
nimble v0.14.2 compiled at 2023-10-01 01:41:20

I had previously installed Nim via Homebrew package manager. In order to avoid any issues this might cause, I did a brew uninstall nim and reinstalled nim via the preferred choosenim.

When I tried running nimble install nimlsp, I ran into the following issue:

   Downloading https://github.com/PMunch/nimlsp using git
   Verifying dependencies for [email protected]
      Info:  Dependency on jsonschema@>= 0.2.1 already satisfied
   Verifying dependencies for [email protected]
      Info:  Dependency on ast_pattern_matching@any version already satisfied
   Verifying dependencies for [email protected]
      Info:  Dependency on asynctools@>= 0.1.1 already satisfied
   Verifying dependencies for [email protected]
   Installing [email protected]
      Building nimlsp/nimlsp_debug using c backend
   /Users/me/.nimble/pkgs2/ast_pattern_matching-1.0.0-b5b08c554b072eed227f98a437f7333584cf957e/ast_pattern_matching.nim(575, 28) Error: invalid indentation
      Prompt: Build failed for '[email protected]', would you like to try installing 'nimlsp@#head' (latest unstable)? [y/N]
      Answer: n
         Tip: 12 messages have been suppressed, use --verbose to show them.
   nimble.nim(729)          install

      Error:  Aborting installation due to build failure.

I tried uninstalling ast_pattern_matching with nimble uninstall ast_pattern_matching but there was no package to delete: Error: Failed uninstall - no packages to delete.

As suggested by @PMunch, I went ahead and deleted nimble packages: rm -rf ~/.nimble/pkgs2/ ~/.nimble/pkgs to get rid of any remnants of the original brew installation of nim. After deleting the packages, nimble install nimlsp installed successfully.

levinotik avatar Oct 02 '23 14:10 levinotik

@PMunch shall I close since resolution is included?

levinotik avatar Oct 02 '23 14:10 levinotik

I haven't quite decided yet if this should be added to the README. So let's keep it open for now

PMunch avatar Oct 02 '23 17:10 PMunch