nimble
nimble copied to clipboard
nimble refresh fails
Recently installed Nim on a new OS install and I cannot get nimble to download the package list via refresh.
Running nimble refresh --verbose
results in:
Info: Nimble data file "/home/bit/.nimble/nimbledata2.json" has been loaded.
Downloading Official package list
Trying https://raw.githubusercontent.com/nim-lang/packages/master/packages.json
Warning: Could not download: Invalid argument
... Additional info: Try again
Trying https://nim-lang.org/nimble/packages.json
packageinfo.nim(180) fetchList
Error: Refresh failed
... Could not download: Invalid argument
... Additional info: Try again
Info: Nimble data file "/home/bit/.nimble/nimbledata2.json" has been saved.
Trying the same command again results in the same output.
I can easily download the urls nimble tries to via wget. Shouldn't be a network issue on my end, I have a typical setup. Is there a way to do this manually for a temporary fix? Hard to use nimble without the official package list.
nimble -v
nimble v0.14.2 compiled at 2023-08-01 01:21:33
git hash: couldn't determine git hash
This is related to #1139 and has been fixed. Please wait until: a) your distribution updates Nim/Nimble b) or if you use choosenim, update to the devel branch
This can be closed.
This is related to #1139 and has been fixed. Please wait until: a) your distribution updates Nim/Nimble b) or if you use choosenim, update to the devel branch
This can be closed.
Still failed with the devel
channel
I can confirm that this bug is still present.
I've built the latest nimble
via koch nimble
:
$ nimble -v
nimble v0.14.2 compiled at 2023-12-12 07:35:03
git hash: a1fdbe8912a0e3dfd30cef030bbabef218d84687
and I have .nimble
folder containing nimbledata2.json
and an empty pkgs2
subfolder.
Running nimble refresh
produces:
$ nimble refresh --verbose
Reading config file at /home/miran/.config/nimble/nimble.ini
Info: Nimble data file "/home/miran/.nimble/nimbledata2.json" has been loaded.
Copying local package list
json.nim(1053) parseFile
Error: cannot read from file: /home/miran/.nimble/packages.json
Info: Nimble data file "/home/miran/.nimble/nimbledata2.json" has been saved.
Copying packages.json
from my old nimble folder fixes the problem. But this is not something that a user should do.
Now I tried to delete the .nimble
folder to try again.
It creates nimbledata2.json
and empty pkgs2
subfolder, mentioned two comments above. It produces warning about missing nimbledata2.json
and then it similarly fails:
$ nimble refresh --verbose
Reading config file at /home/miran/.config/nimble/nimble.ini
Warning: Nimble data file "/home/miran/.nimble/nimbledata2.json" is not found.
Copying local package list
json.nim(1053) parseFile
Error: cannot read from file: /home/miran/.nimble/packages.json
Info: Nimble data file "/home/miran/.nimble/nimbledata2.json" has been saved.
I have no clue why but I cannot reproduce this bug.
I have no clue why but I cannot reproduce this bug.
Did you:
- Remove old Nimble files? (So there is no existing
packages.json
) - Install Nimble via
koch nimble
?
Yes, I did. I cannot reproduce this bug when I do that.