[GH-ISSUE #88] PKG files not being loaded? #39

Closed
opened 2026-02-27 08:14:53 +03:00 by kerem · 3 comments
Owner

Originally created by @JaneJeon on GitHub (Nov 25, 2021).
Original GitHub issue: https://github.com/lldap/lldap/issues/88

Hey, I'm really sorry about filing all these issues but it's just what I've been encountering as I've been trying to set it up myself...

After I've finally set up the server (after dealing with the permissions issues), I load up the server at 17170 and... nothing. Just a blank screen.

On further inspection, it seems that GET call to /pkg/bundle.js was returning 404. Fair enough.

I checked the /app directory, and there it is - /app/app/bundle.js.

I was checking the code for why it might 404, and I think this is the issue: github.com/nitnelave/lldap@edf9e538ce/server/src/infra/tcp_server.rs (L78)

Specifically, when you bundle all the stuff together with rollup, you place it within /app/app/pkg/bundle.js, and within the Dockerfile, you copy it onto the /app/app/bundle.js: https://github.com/nitnelave/lldap/blob/main/Dockerfile#L60

I'm guessing when you last used/tested the frontend, it was pre-packaging the files during Docker build steps (i.e. the endpoint was serving ./pkg/bundle.js just fine because the pkg directory was there), but because the server looks for the hardcoded ./pkg/* directory, it cannot find the bundle (and everything else that was packaged) when you run the Docker container.

I highly suspect that this is the case. Could you put out a fix if it is? It's preventing anyone from actually using the frontend. Thanks

Originally created by @JaneJeon on GitHub (Nov 25, 2021). Original GitHub issue: https://github.com/lldap/lldap/issues/88 Hey, I'm really sorry about filing all these issues but it's just what I've been encountering as I've been trying to set it up myself... After I've finally set up the server (after dealing with the permissions issues), I load up the server at 17170 and... nothing. Just a blank screen. On further inspection, it seems that GET call to `/pkg/bundle.js` was returning 404. Fair enough. I checked the `/app` directory, and there it is - `/app/app/bundle.js`. I was checking the code for why it might 404, and I think this is the issue: https://github.com/nitnelave/lldap/blob/edf9e538ceee77d00fc1994f156d97ba52622421/server/src/infra/tcp_server.rs#L78 Specifically, when you bundle all the stuff together with rollup, you place it within `/app/app/pkg/bundle.js`, and within the Dockerfile, you copy it onto the `/app/app/bundle.js`: https://github.com/nitnelave/lldap/blob/main/Dockerfile#L60 I'm guessing when you last used/tested the frontend, it was _pre-packaging_ the files during Docker build steps (i.e. the endpoint was serving `./pkg/bundle.js` just fine because the `pkg` directory was there), but because the server looks for the hardcoded `./pkg/*` directory, it cannot find the bundle (and everything else that was packaged) when you run the Docker container. I highly suspect that this is the case. Could you put out a fix if it is? It's preventing anyone from actually using the frontend. Thanks
kerem closed this issue 2026-02-27 08:14:53 +03:00
Author
Owner

@nitnelave commented on GitHub (Nov 25, 2021):

Thanks for the debug! That issue came from the latest dockerfile, and the "COPY" not doing what I expected (it flattened the directory). I'm pushing a fix in #90 .

<!-- gh-comment-id:978984443 --> @nitnelave commented on GitHub (Nov 25, 2021): Thanks for the debug! That issue came from the latest dockerfile, and the "COPY" not doing what I expected (it flattened the directory). I'm pushing a fix in #90 .
Author
Owner

@JaneJeon commented on GitHub (Nov 25, 2021):

nice, thanks for the quick fix and happy thanksgivign!

<!-- gh-comment-id:979182182 --> @JaneJeon commented on GitHub (Nov 25, 2021): nice, thanks for the quick fix and happy thanksgivign!
Author
Owner

@JaneJeon commented on GitHub (Nov 25, 2021):

*thanksgiving

<!-- gh-comment-id:979182222 --> @JaneJeon commented on GitHub (Nov 25, 2021): *thanksgiving
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#39
No description provided.