Node versions differ when using sudo
Typically you should never need to run npm with sudo but I get permission errors when I do not use sudo with npm in the warden docker containers.
I am running into issues because the version that I have defined is using the correct version if I just use npm but once I use sudo is defaulting to the old npm version.

.env file:
WARDEN_ENV_NAME=vue
WARDEN_ENV_TYPE=local
WARDEN_WEB_ROOT=/
TRAEFIK_DOMAIN=vue.test
TRAEFIK_SUBDOMAIN=app
PHP_VERSION=8.1
NODE_VERSION=16
.warden/warden-env.yml:
version: "3.5"
services:
php-fpm:
hostname: "${WARDEN_ENV_NAME}-php-fpm"
image: docker.io/wardenenv/php-fpm:${PHP_VERSION:-7.4}${WARDEN_SVC_PHP_VARIANT:-}
environment:
- TRAEFIK_DOMAIN
- TRAEFIK_SUBDOMAIN
- NODE_VERSION=${NODE_VERSION:-12}
- COMPOSER_MEMORY_LIMIT=-1
volumes:
- ./:/var/www/html
extra_hosts:
- ${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
volumes:
appdata: {}
If I have a configuration issue wrong or a way to fix the permissions please advise. Otherwise can we get the 2 node versions to match based on the value set in the .env file?
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.