diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 97bea45fa0..0ad1fb77ff 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -25,7 +25,7 @@ "version": "latest" }, "ghcr.io/devcontainers/features/node:1": { - "version": "20.16.0" + "version": "22.11.0" } }, diff --git a/.nvmrc b/.nvmrc index 9de2256827..deed13c016 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -lts/iron +lts/jod diff --git a/.tool-versions b/.tool-versions index 35ed4145ab..a8eca4ee53 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ ruby 3.2.4 -yarn 1.22.19 -nodejs 20.16.0 +yarn 1.22.22 +nodejs 22.11.0 diff --git a/Dockerfile b/Dockerfile index 32c58e95c3..4800a801db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,16 +20,17 @@ ARG RAILS_ROOT=/usr/src/app/ RUN apk update && apk upgrade && apk add --update --no-cache \ bash \ + curl \ imagemagick \ - nodejs \ postgresql-client \ tzdata \ - vim \ - yarn && rm -rf /var/cache/apk/* + vim && rm -rf /var/cache/apk/* +RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ nodejs=22.11.0-r0 npm WORKDIR $RAILS_ROOT COPY . . +RUN npm install --global yarn RUN yarn install RUN yarn build && yarn build:css diff --git a/doc/LINUX_SETUP.md b/doc/LINUX_SETUP.md index 8fb84a691f..3255077363 100644 --- a/doc/LINUX_SETUP.md +++ b/doc/LINUX_SETUP.md @@ -52,9 +52,9 @@ sudo -u postgres psql -c "CREATE USER $USER WITH CREATEDB" ``` # Install NVM and Node JS # you can use curl -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash # or wget -wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash +wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash # Restart your terminal @@ -72,6 +72,11 @@ npm i -g npm@latest npm i -g yarn ``` +``` +# add node and node tools to the path +nvm alias default lts/jod +``` + ``` # Install and configure rbenv sudo apt install rbenv diff --git a/package.json b/package.json index e3d92f7a8e..f4c5a69414 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,6 @@ ] }, "engines": { - "node": "20.x" + "node": "22.x" } }