vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.75k stars 2.16k forks source link

Cannot build program that imports external modules with sudo #5877

Closed serkonda7 closed 4 years ago

serkonda7 commented 4 years ago

V version: V 0.1.28 1114fd2 OS: Manjaro

What did you do? Run sudo v symlinker.v to build my program that imports etienne_napoleone.chalk. Same behaviour is with any other module installed from vpm.

What did you expect to see? Successful build

What did you see instead? builder error: cannot import module "etienne_napoleone.chalk" (not found)

Gladear commented 4 years ago

It does work, however the module must be installed using sudo too. The user directory when using sudo is /root by default, thus modules must be installed in /root/.vmodules.