Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade node version to match heroku #6103

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"version": "latest"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "20.16.0"
"version": "22.11.0"
}
},

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/iron
lts/jod
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruby 3.2.4
yarn 1.22.19
nodejs 20.16.0
yarn 1.22.22
nodejs 22.11.0
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 7 additions & 2 deletions doc/LINUX_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@
]
},
"engines": {
"node": "20.x"
"node": "22.x"
}
}