diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 7d1ead7a..6dcf6ac0 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '20.x' cache: 'npm' - name: Install dependencies diff --git a/.github/workflows/deploy_master.yml b/.github/workflows/deploy_master.yml index a5df7d68..b9e8b7a5 100644 --- a/.github/workflows/deploy_master.yml +++ b/.github/workflows/deploy_master.yml @@ -19,10 +19,10 @@ jobs: run: > git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" - - name: node.js 18 + - name: Use Node.js 20.x uses: actions/setup-node@v4.0.1 with: - node-version: 18.x + node-version: '20.x' registry-url: https://registry.npmjs.org/ cache: "npm" diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index b0774617..ec3e7005 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -19,10 +19,10 @@ jobs: run: > git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" - - name: node.js 18 + - name: Use Node.js 20.x uses: actions/setup-node@v4.0.1 with: - node-version: 18.x + node-version: '20.x' registry-url: https://registry.npmjs.org/ cache: "npm" diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..209e3ef4 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 diff --git a/Dockerfile b/Dockerfile index b2dec3ea..3efb556b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18.8-alpine as compiler +FROM node:20-alpine as compiler RUN apk add --no-cache openssh-client \ && mkdir ~/.ssh && ssh-keyscan github.com > ~/.ssh/known_hosts @@ -26,6 +26,9 @@ WORKDIR /app COPY ./package-lock.json /app/package-lock.json COPY ./package.json /app/package.json +# Use sharp's bundled libvips instead of global one to avoid compilation issues +ENV SHARP_IGNORE_GLOBAL_LIBVIPS=1 + RUN npm install COPY ./src /app/src @@ -44,7 +47,7 @@ RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build:server RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build:front -- --prefix-paths RUN npm prune --production -FROM node:18.8-alpine +FROM node:20-alpine WORKDIR /app RUN rm -rf \ diff --git a/package-lock.json b/package-lock.json index eea33457..c5e08823 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,8 +94,7 @@ "workbox-cli": "^6.5.2" }, "engines": { - "node": "18.*", - "npm": "8.* || 9.*" + "node": ">=20.20.0" } }, "node_modules/@0xsequence/abi": { diff --git a/package.json b/package.json index 9592b307..fdfe6b00 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,7 @@ "version": "0.0.0-development", "author": "", "engines": { - "node": "18.*", - "npm": "8.* || 9.*" + "node": "20.x" }, "dependencies": { "@dcl/hooks": "^1.0.0",