Hello.

I'm starting to use D, and therefore Dub.
I didn't find a more suitable category than this one in the forum to ask my question, I'm sorry if it is not the most suitable.

My concern is thus the following: I can't add packages to my project, Dub warns me that they are not available. For the example, I try to add this dependency (https://code.dlang.org/packages/pegged) with the following command: dub add pegged . Dub then returns an error:

Failed to get versions for package pegged on provider registry at https://code.dlang.org/ (fallbacks registry at https://codemirror.dlang.org/, registry at https://dub.bytecraft.nl/, registry at https://code-mirror.dlang.io/): Failed to download https://code.dlang.org/api/packages/infos?packages=%5B%22pegged%22%5D&include_dependencies=true&minimize=true
Could not find package 'pegged'.

My project was initialized correctly with Dub (dub init... + the whole procedure). I also tried to add the dependency manually, in dub.sdl:

  dependency "pegged" version="~>0.4.2"

But it doesn't change anything.
Why doesn't it work? What do I need to do to get Dub to download and add dependencies?

Thanks in advance.

PS: how do you write blocks of code and insert links in forum posts? I've tried the makefile syntax, but it doesn't work. Thanks too!

Reply via email to