Backend image fails on startup: Cannot find module 'uuid' #7
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
backmeupplz/todorant#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The published image
ghcr.io/backmeupplz/todorant-backend:lateststarts, but theKoa app fails to load, so no API routes are registered.
<TODORANT_API>/docs/returns "not found" and the web app can't sign in or create an account.
The module
uuidis simply not present in the image'snode_modules.Steps to reproduce
Quick check, no compose needed:
Result:
Full reproduction, following docs/self-hosting.md:
docker-compose.ymland.env.examplefrommain, setJWTto a random valuedocker compose up -ddocker compose logs backendActual log
Expected
No "Koa app starting error".
<TODORANT_API>/docs/shows the API docs andsign-up works.
Environment
ghcr.io/backmeupplz/todorant-backend@sha256:29ad33c21855d6a14ec9900a746362b6a56359609ab45ddf6f471222fdb10596Workaround
A derived image that copies the module in makes the backend start. The version
(8.3.2) is my guess; I don't know which one the code expects.
I haven't checked the cause, but it looks like
uuidis missing fromdependenciesinbackend/package.jsonor is removed in the production buildstage.
Thank you for such a thorough report! The digest check, full logs and workaround made this very easy to confirm.
You were right about the cause. Removing
googleapisin #4 also removed the only production package that pulled inuuid, so the--productionimage no longer had it. This was fixed in #8 the same day:uuidis now a direct dependency, and the backend now crashes on a bootstrap error instead of starting without any routes. Your image (sha256:29ad33c2…, built 2026-10-14 from99589d7) came out just before that fix.I've just verified both
ghcr.io/backmeupplz/todorant-backend:latestand:v2.2.6(amd64 and arm64):node_modules/uuidis present, there's no "Koa app starting error",/docs/returns 200, and sign-up works. Pulling again and dropping the derived image should be all you need:If anything else breaks, please open another issue.