#weird error when trying to compile with lustre

1 messages · Page 1 of 1 (latest)

unique basin
#

im trying to use lustre but i can't even get it to compile. I have a blank project with no deps other than lustre and when i go to build i get this error:

error: File IO failure

An error occurred while trying to link this file:

    C:\Users\{user}\test_app\build\dev\javascript\lustre\priv

The error message from the file IO library was:

    A required privilege is not held by the client. (os error 1314)
rough plinth
#

If you search on this server with "A required privilege is not held by the client", you will find many hits. AFAIK it's due to Windows not allowing the creation of symlinks without administrator permissions (the Gleam build tool tries to symlink the priv folder contents).

#

I'm not sure on what the solution is, but I've heard people suggest going into WSL instead of being directly in Windows.

unique basin
#

thank you, i'll try searching

#

i hope there's another solution bc wsl is a pain 😭

#

im going to try using an administrator window

rough plinth
unique basin
#

damn how is that not fixed yet

#

i would try to fix it but large code bases seem intimidating

#

but my issue is solved for the most part thank you

grizzled whale
#

btw, what are your issues with wsl? I've been really happy with it overall

jolly pivot
#

😔

#

running as admin is probably the most viable option, you can also enable developer mode but of course perahps you do not want to do this

#

i think wsl is a non-suggestion, if someone wants to work on windows going "hey have you tried Not Doing That" isnt really that helpful

unkempt locust
#

It’s fixable

#

I’ll do that for this release

grizzled whale
#

this problem has been really common in the last few weeks

jolly pivot
#

louis is trying to sabotage lustre

narrow imp
#

WSL is always an option 😉

rough plinth
#

that has already been discussed

jolly pivot
narrow imp
#

Windows is just a pain to support. Since it works different in every way. Until today some nodejs will either break or be slow on windows

agile harness
#

I completely agree that supporting Windows can be a pain. But if you support only WSL you can't claim it "works in Windows".

unkempt locust
#

We do support windows first-class

#

Gleam was largely developed on Windows

#

I'm on macOS atm largely because I wanted an ARM processor

agile harness
#

I didn't claimed Gleam don't support Windows

unkempt locust
#

Didn't say you did 😁

unique basin
unique basin
unkempt locust
#

I wish windows would just support symlinks already

grizzled whale
#

someone had suggested to just copy the priv folders instead of linking them, would that work?

unkempt locust
#

traversing and hard linking is the way to go I think

unique basin
#

man i can't even compile with docker bc of this issue

#

even running as administrator doesnt work

unkempt locust
#

What issue are you having now?

#

This problem only happens when not using developer mode or admin perms

unique basin
#

it doesnt happen when i manually compile

unkempt locust
#

Share the error please

#

When you manually compile?

unkempt locust
#

What does manually compile mean?

unique basin
unkempt locust
#

What do you mean?

#

I don't know what you're running. What does manually compile mean? How are you using docker?

unique basin
unique basin
#

but if i enter in the same command from the dockerfile into the terminal myself the error doesn't show, as i have dev mode on

#

sorry for the horrid wording 😭

#

i actually might have to resort to wsl sadly

#

i hate windows sm but it has too much i can't give up on

unkempt locust
#

What operating system are you using inside docker?

#

I suspect this isn't the same issue

unique basin
#

alpine i believe

unique basin
#

man i must be hella tired or something

unkempt locust
#

Alpine Linux supports symlinks so it'll be something else

#

Docker can be very confusing at times

unique basin
#

yeah

grizzled whale
#

are you building inside a docker volume?

unique basin
#

nope

#

i just started working with docker

#

i'll try and figure the issue out myself

unkempt locust
#

Have you tried the dockerfile we have in the docs?

#
FROM ghcr.io/gleam-lang/gleam:v1.5.1-erlang-alpine

# Add project code
COPY . /build/

# Compile the project
RUN cd /build \
  && gleam export erlang-shipment \
  && mv build/erlang-shipment /app \
  && rm -r /build

# Run the server
WORKDIR /app
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["run"]
unique basin
#

i'm still learning a lot about web dev and docker so it's probably bc of something i haven't learned yet

arctic pelican
# unique basin i just turned on developer mode for now

today i used a powershell command in admin simmilar to this

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

and i was able to temporarly solve it inside vscode not admin terminal

but after a while its back

#

turning on dev mode is the best option rn