Repository navigation
[Bug]: Unable to install with docker, container startup failed #776
Contact DetailsNo response What happened?Container cannot start, error log: Error: Cannot find module '/app/api/server/index.js' Steps to ReproduceNeither bulid image nor docker hub image can be started, regardless of configuration. What browsers are you seeing the problem on?No response Relevant log outputNode.js v19.9.0
}
requireStack: []
code: 'MODULE_NOT_FOUND',
at node:internal/main/run_main_module:23:47 {
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at Module._load (node:internal/modules/cjs/loader:934:27)
at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
Error: Cannot find module '/app/api/server/index.js'
^
throw err;
node:internal/modules/cjs/loader:1093
> cross-env NODE_ENV=production node api/server/index.js
> LibreChat@0.5.6 backendScreenshotsCode of Conduct
|
Replies: 3 comments 13 replies
|
Just did a clean installation and can't reproduce it. I recommend you install git and npm and run |
|
Probably the same mistake I made, or at least something adjacent - the Compose file tells you to bind-mount "./api" which only works if you cloned the repo. If you want to run it like a Docker image is usually used, i. e. precisely without cloning the repo and instead pull the image from GHCR, it clears out the /app/api directory, resulting in the above error. If there is any data in that directory that requires persistence, the Compose file should specify the exact path, not the entire api folder. |
|
I was able to reproduce this issue on a computer on an old commit. #1330 should fix this if you want to try again. it's also important to use |

I was able to reproduce this issue on a computer on an old commit. #1330 should fix this if you want to try again.
it's also important to use
docker-compose build --no-cacheto ensure the cache isn't being used