Error: module `vibe` is in file 'vibe\vibe.d' which cannot be read

Steven Schveighoffer schveiguy at
Fri Apr 3 20:49:33 UTC 2020

On 4/3/20 4:21 PM, Baby Beaker wrote:
> #!/usr/bin/env dub
> /+ dub.sdl:
>     name "hello_vibed"
>     dependency "vibe-d" version="~>0.8.0"
> +/
> import vibe.vibe;
> void main()
> {
>      listenHTTP("", (req, res) {
>          res.writeBody("Hello Vibe.d: " ~ req.path);
>      });
>      runApplication();
> }
> Message error:
> Error: module `vibe` is in file 'vibe\vibe.d' which cannot be read
> I'm trying to use vibe, but I get this error? I am a Dlang study yet. 
> Someone can helpe me step by step get write this Hello Vibe.d working in 
> browser? Thank you.

That error generally means it can't find the import.

Dub should take care of the download of the module, and the import 

Note, this runs for me on my system.

Try doing this from the command line:

dub run -v --single thefile.d

instead of using the #! directive. This will print all the steps and 
commands dub uses to build the file, maybe there's a clue there.


More information about the Digitalmars-d-learn mailing list