diff --git a/scripts/common_startup.sh b/scripts/common_startup.sh index ff9f853bdbf..600805fce3b 100755 --- a/scripts/common_startup.sh +++ b/scripts/common_startup.sh @@ -18,6 +18,7 @@ CREATE_VENV=1 REPLACE_PIP=$SET_VENV COPY_SAMPLE_FILES=1 SKIP_CLIENT_BUILD=${GALAXY_SKIP_CLIENT_BUILD:-0} +NODE_VERSION=${GALAXY_NODE_VERSION:-"9.11.1"} for arg in "$@"; do [ "$arg" = "--skip-eggs" ] && FETCH_WHEELS=0 @@ -223,9 +224,9 @@ fi if [ $SKIP_CLIENT_BUILD -eq 0 ]; then # Ensure dependencies are installed if [ -n "$VIRTUAL_ENV" ]; then - if ! in_venv "$(command -v node)"; then + if ! in_venv "$(command -v node)" || [ "$(node --version)" != "v$NODE_VERSION" ]; then echo "Installing node into $VIRTUAL_ENV with nodeenv." - nodeenv -n 9.11.1 -p + nodeenv -n $NODE_VERSION -p fi if ! in_venv "$(command -v yarn)"; then echo "Installing yarn into $VIRTUAL_ENV with npm."