Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
April 03, 2020 Error: module `vibe` is in file 'vibe\vibe.d' which cannot be read | ||||
---|---|---|---|---|
| ||||
#!/usr/bin/env dub /+ 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. |
April 03, 2020 Re: Error: module `vibe` is in file 'vibe\vibe.d' which cannot be read | ||||
---|---|---|---|---|
| ||||
Posted in reply to Baby Beaker | 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("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
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.
-Steve
|
April 04, 2020 Re: Error: module `vibe` is in file 'vibe\vibe.d' which cannot be read | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | 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
>
> 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.
>
> -Steve
Not work for me. I study Dlang for one years and never can use dub. Just get deprecated and error e nothing work.
|
April 03, 2020 Re: Error: module `vibe` is in file 'vibe\vibe.d' which cannot be read | ||||
---|---|---|---|---|
| ||||
Posted in reply to Baby Beaker | 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
>>
>> 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.
>>
>
> 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
|
April 05, 2020 Re: Error: module `vibe` is in file 'vibe\vibe.d' which cannot be read | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | 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
>
> 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.
>
> -Steve
Now I get this work, but dub is very slow. Almost 1 minute for compile.
|
Copyright © 1999-2021 by the D Language Foundation