diff --git a/DEVNOTES.md b/DEVNOTES.md index b3469cf113..15d615ba51 100644 --- a/DEVNOTES.md +++ b/DEVNOTES.md @@ -13,7 +13,7 @@ Alternatively, you may install DUOS locally. 1. Install Node LTS, but verify the [version of Node declared in the Dockerfile](https://github.com/DataBiosphere/duos-ui/blob/develop/Dockerfile#L2) and install that when setting up. You can install it with [Volta](https://docs.volta.sh/guide/understanding) or NVM. ``` -volta install node@24.7.0 +volta install node@24.9.0 ``` 2. Next, install the project dependencies. diff --git a/Dockerfile b/Dockerfile index bb85809670..bbc98b90e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # builder image -FROM node:24.7.0-trixie AS builder +FROM node:24.9.0-trixie AS builder LABEL maintainer="grushton@broadinstitute.org" # set working directory diff --git a/docs/getting-started.md b/docs/getting-started.md index 058f4dd4f8..0b863b8def 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -70,7 +70,7 @@ gcloud auth application-default login gcloud auth configure-docker # install the appropriate version of nodejs and its dependencies -NODE_VERSION=$(curl -L https://raw.githubusercontent.com/DataBiosphere/duos-ui/develop/Dockerfile | awk 'NR==2 {gsub(":","@",$2); print $2}') +NODE_VERSION=$(curl -L https://raw.githubusercontent.com/DataBiosphere/duos-ui/develop/Dockerfile | awk 'NR==2 {gsub(/node:|-.*/,"", $2); print "node@" $2}') volta setup && volta install ${NODE_VERSION} ``` diff --git a/scripts/setup-devcontainer.sh b/scripts/setup-devcontainer.sh index c9ccf60286..29768c85a0 100755 --- a/scripts/setup-devcontainer.sh +++ b/scripts/setup-devcontainer.sh @@ -17,6 +17,12 @@ install_gcloud_cli() { sudo apt install -y google-cloud-cli } +install_node_with_nvm() { + NODE_VERSION=$(awk 'NR==2 {gsub(/node:|-.*/,"", $2); print $2}' Dockerfile) + . "${NVM_DIR}/nvm.sh" + nvm install "$NODE_VERSION" +} + install_duos_cypress() { npm install npx cypress install @@ -41,6 +47,7 @@ dev_container() { cypress_requirements gcloud_cli_requirements install_gcloud_cli + install_node_with_nvm install_duos_cypress install_duos_config }