[Bug]: docker compose up leads to npm cache permission error #1441
-
What happened?docker-compose up can not start the Librechat container, as it errors out with an error:
Steps to ReproduceI am on MacOS 14.2.1 with Rancher Desktop 1.11.1 git clone https://github.com/danny-avila/LibreChat.git
cd LibreChat
cp .env.example .env
# Adapt .env file, see below
mkdir meili_data_v1.5 images .env.production .env.development data-node
docker-compose up For the What browsers are you seeing the problem on?No response Relevant log outputLibreChat |
LibreChat | > LibreChat@0.6.5 backend
LibreChat | > cross-env NODE_ENV=production node api/server/index.js
LibreChat |
LibreChat | npm ERR! code EACCES
LibreChat | npm ERR! syscall mkdir
LibreChat | npm ERR! path /.npm
LibreChat | npm ERR! errno -13
LibreChat | npm ERR!
LibreChat | npm ERR! Your cache folder contains root-owned files, due to a bug in
LibreChat | npm ERR! previous versions of npm which has since been addressed.
LibreChat | npm ERR!
LibreChat | npm ERR! To permanently fix this problem, please run:
LibreChat | npm ERR! sudo chown -R 504:20 "/.npm"
LibreChat |
LibreChat | npm ERR! Log files were not written due to an error writing to the directory: /.npm/_logs
LibreChat | npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
LibreChat exited with code 0 ScreenshotsNo response Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
I’ve never experienced this, have you tried without this step?
not sure if manually creating those directories is necessary |
Beta Was this translation helpful? Give feedback.
-
I'm running into this as well. |
Beta Was this translation helpful? Give feedback.
-
Is the nom cache part of a volume? If not, might be the issue that different users build and run the docker image? |
Beta Was this translation helpful? Give feedback.
-
Did this ever get officially "fixed"? The proposed fix by another user here looks outdated when I look at the current I just hit this issue once I tried to setup my |
Beta Was this translation helpful? Give feedback.
I was able to get around it with the following changes