I’m trying to follow these steps to run CHT Watchdog in develop mode.
I’m executing
docker compose -f docker-compose.yml -f exporters/postgres/docker-compose.postgres-exporter.yml -f development/fake-cht/docker-compose.fake-cht.yml up -d
This results in these npm permission errors
cht-watchdog-fake-cht-1 | npm ERR! code EACCES
cht-watchdog-fake-cht-1 | npm ERR! syscall mkdir
cht-watchdog-fake-cht-1 | npm ERR! path /home/node/app/node_modules
cht-watchdog-fake-cht-1 | npm ERR! errno -13
cht-watchdog-fake-cht-1 | npm ERR! Error: EACCES: permission denied, mkdir '/home/node/app/node_modules'
cht-watchdog-fake-cht-1 | npm ERR! [Error: EACCES: permission denied, mkdir '/home/node/app/node_modules'] {
cht-watchdog-fake-cht-1 | npm ERR! errno: -13,
cht-watchdog-fake-cht-1 | npm ERR! code: 'EACCES',
cht-watchdog-fake-cht-1 | npm ERR! syscall: 'mkdir',
cht-watchdog-fake-cht-1 | npm ERR! path: '/home/node/app/node_modules'
cht-watchdog-fake-cht-1 | npm ERR! }
cht-watchdog-fake-cht-1 | npm ERR!
cht-watchdog-fake-cht-1 | npm ERR! The operation was rejected by your operating system.
cht-watchdog-fake-cht-1 | npm ERR! It is likely you do not have the permissions to access this file as the current user
cht-watchdog-fake-cht-1 | npm ERR!
cht-watchdog-fake-cht-1 | npm ERR! If you believe this might be a permissions issue, please double-check the
cht-watchdog-fake-cht-1 | npm ERR! permissions of the file and its containing directories, or try running
cht-watchdog-fake-cht-1 | npm ERR! the command again as root/Administrator.
cht-watchdog-fake-cht-1 |
cht-watchdog-fake-cht-1 | npm ERR! A complete log of this run can be found in: /home/node/.npm/_logs/2023-07-18T07_31_00_770Z-debug-0.log
I can resolve these issues by removing the line user: "node"
in the development/fake-cht/docker-compose.fake-cht.yml
. I ran rm -Rf development/fake-cht/node_modules
to ensure this folder is empty.
Did I miss a step? Something missing in the docs? Bug? Welcome any and all thoughts. cc @jkuester