icyphox / fab

:star2: print fabulously in your terminal
MIT License
49 stars 6 forks source link

Error: cannot open 'fab' #7

Closed s0kil closed 6 years ago

s0kil commented 6 years ago

I have installed fab as mentioned in repo readme. When I try to import it, I get an error: Error: cannot open 'fab'

icyphox commented 6 years ago

Hey, would you mind giving me some more info? Like your compiler version, operating system? Moreover, can you see fab-0.4.1 in your ~/.nimble/pkgs/ dir?

s0kil commented 6 years ago
$ nimble install fab
Downloading https://github.com/icyphox/fab using git
  Verifying dependencies for fab@0.4.1
       Tip: 4 messages have been suppressed, use --verbose to show them.
     Error: The .nimble-link file is pointing to a missing file: /home/flairfocus/Desktop/Edu-Lab/Nim/karax-folder/karax/karax.nimble

I have no idea what the .nimble-link is.

$ nimble install fab --verbose
    Reading official package list
Downloading https://github.com/icyphox/fab using git
    Cloning latest tagged version: v0.4.1
    Setting Nim stdlib prefix to 
    Setting Nim stdlib path to /home/flairfocus/.choosenim/toolchains/nim-0.18.0/lib
  Verifying dependencies for fab@0.4.1
     Error: The .nimble-link file is pointing to a missing file: /home/flairfocus/Desktop/Edu-Lab/Nim/karax-folder/karax/karax.nimble
$ ls ~/.nimble/pkgs/
karax-#head  nigui-0.1.0
$ cd /home/flairfocus/Desktop/Edu-Lab/Nim/karax-folder/
bash: cd: /home/flairfocus/Desktop/Edu-Lab/Nim/karax-folder/: No such file or directory
$ nim -v
Nim Compiler Version 0.18.0 [Linux: amd64]
Copyright (c) 2006-2018 by Andreas Rumpf

git hash: 855956bf617f68ac0be3717329e9e1181e5dc0c6
active boot switches: -d:release
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Pop!_OS 18.04 LTS
Release:    18.04
Codename:   bionic

So I deleted karax-#head from the ~/.nimble/pkgs/ directory.

$ ls ~/.nimble/pkgs/
nigui-0.1.0

Now I try installing Fab once again.

$ nimble install fab --verbose
    Reading official package list
Downloading https://github.com/icyphox/fab using git
    Cloning latest tagged version: v0.4.1
    Setting Nim stdlib prefix to 
    Setting Nim stdlib path to /home/flairfocus/.choosenim/toolchains/nim-0.18.0/lib
  Verifying dependencies for fab@0.4.1
     Error: Unsatisfied dependency: nim (>= 0.18.1)
$ choosenim update stable
   Updating stable
      Info: Already up to date at version 0.18.0
      Info: Waiting 5 secs for remaining telemetry data to be sent.

What? Latest Nim release is v0.18.0.

icyphox commented 6 years ago

Ah yikes, thanks for pointing this out. I built my Nim compiler from the latest Git commit, which is v0.18.1.

I'll fix the dependency requirement in a bit. Until then, you can clone this repo and edit the fab.nimble file to say 0.18.0 instead of 0.18.1. Finally, run nimble install in the same directory.

icyphox commented 6 years ago

Fixed! Run nimble install fab again, and you should be good to go. Closing this issue.

s0kil commented 6 years ago

Thanks.