www.digitalmars.com         C & C++   DMDScript  

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

reply Baby Beaker <thegrapevine email.com> writes:

/+ dub.sdl:
    name "hello_vibed"
    dependency "vibe-d" version="~>0.8.0"
+/
import vibe.vibe;

void main()
{
     listenHTTP("127.0.0.1:8080", (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.
Apr 03 2020
parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
On 4/3/20 4:21 PM, Baby Beaker wrote:

 /+ dub.sdl:
     name "hello_vibed"
     dependency "vibe-d" version="~>0.8.0"
 +/
 import vibe.vibe;
 
 void main()
 {
      listenHTTP("127.0.0.1:8080", (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 directory. Note, this runs for me on my system. Try doing this from the command line: dub run -v --single thefile.d commands dub uses to build the file, maybe there's a clue there. -Steve
Apr 03 2020
next sibling parent reply Baby Beaker <thegrapevine email.com> writes:
On Friday, 3 April 2020 at 20:49:33 UTC, Steven Schveighoffer 
wrote:
 On 4/3/20 4:21 PM, Baby Beaker wrote:
 [...]
That error generally means it can't find the import. Dub should take care of the download of the module, and the import directory. Note, this runs for me on my system. Try doing this from the command line: dub run -v --single thefile.d steps and commands dub uses to build the file, maybe there's a clue there. -Steve
Not work for me. I study Dlang for one years and never can use dub. Just get deprecated and error e nothing work.
Apr 03 2020
parent Steven Schveighoffer <schveiguy gmail.com> writes:
On 4/3/20 8:07 PM, Baby Beaker wrote:
 On Friday, 3 April 2020 at 20:49:33 UTC, Steven Schveighoffer wrote:
 On 4/3/20 4:21 PM, Baby Beaker wrote:
 [...]
That error generally means it can't find the import. Dub should take care of the download of the module, and the import directory. Note, this runs for me on my system. Try doing this from the command line: dub run -v --single thefile.d commands dub uses to build the file, maybe there's a clue there.
Not work for me. I study Dlang for one years and never can use dub. Just get deprecated and error e nothing work.
It's hard to diagnose something that is working for me. Sorry I couldn't be more help. -Steve
Apr 03 2020
prev sibling parent Baby Beaker <thegrapevine email.com> writes:
On Friday, 3 April 2020 at 20:49:33 UTC, Steven Schveighoffer 
wrote:
 On 4/3/20 4:21 PM, Baby Beaker wrote:
 [...]
That error generally means it can't find the import. Dub should take care of the download of the module, and the import directory. Note, this runs for me on my system. Try doing this from the command line: dub run -v --single thefile.d steps and commands dub uses to build the file, maybe there's a clue there. -Steve
Now I get this work, but dub is very slow. Almost 1 minute for compile.
Apr 04 2020