Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

feat: upgrade frontend to Node.js 24.x (#2577)

Mike Pawlowski201da266d510
diff --git a/.github/workflows/biome-autofix.yml b/.github/workflows/biome-autofix.yml
index a61ae7fdb..7146fa84a 100644
--- a/.github/workflows/biome-autofix.yml
+++ b/.github/workflows/biome-autofix.yml
@@ -21,7 +21,7 @@ jobs:
- uses: actions/setup-node@v7
with:
- node-version: '22'
+ node-version-file: frontend/.nvmrc
- name: Install dependencies
working-directory: frontend
diff --git a/.github/workflows/dependency-audit.yml b/.github/workflows/dependency-audit.yml
index 3972527fa..916a16bee 100644
--- a/.github/workflows/dependency-audit.yml
+++ b/.github/workflows/dependency-audit.yml
@@ -6,6 +6,9 @@ on:
- cron: '0 9 * * 1,4'
workflow_dispatch: # Allow manual trigger
+permissions:
+ contents: read
+
jobs:
npm-audit:
name: NPM Audit
@@ -19,7 +22,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v7
with:
- node-version: '22'
+ node-version: '24'
- name: Run npm audit
working-directory: ${{ matrix.directory }}
diff --git a/.github/workflows/lint-frontend.yml b/.github/workflows/lint-frontend.yml
index b46cb999f..3b91988b7 100644
--- a/.github/workflows/lint-frontend.yml
+++ b/.github/workflows/lint-frontend.yml
@@ -6,6 +6,9 @@ on:
- 'frontend/**'
- '.github/workflows/lint-frontend.yml'
+permissions:
+ contents: read
+
jobs:
biome:
name: Biome
@@ -16,7 +19,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
- node-version: '22'
+ node-version-file: frontend/.nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
@@ -37,7 +40,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
- node-version: '22'
+ node-version-file: frontend/.nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
@@ -60,7 +63,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
- node-version: '22'
+ node-version-file: frontend/.nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml
index a9d47b398..37213e47c 100644
--- a/.github/workflows/security-scan.yml
+++ b/.github/workflows/security-scan.yml
@@ -106,7 +106,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
- node-version: '22'
+ node-version: '24'
- name: Run npm audit for Frontend & Docs
run: |
diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml
index 82bbbd119..0c572b22f 100644
--- a/.github/workflows/test-ci.yml
+++ b/.github/workflows/test-ci.yml
@@ -19,7 +19,6 @@ concurrency:
cancel-in-progress: true
env:
- NODE_VERSION: "22"
PYTHON_VERSION: "3.13"
PLAYWRIGHT_BROWSERS_PATH: "ms-playwright"
PLAYWRIGHT_VERSION: "1.57.0"
@@ -370,7 +369,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
- node-version: ${{ env.NODE_VERSION }}
+ node-version-file: frontend/.nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
@@ -544,7 +543,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
- node-version: ${{ env.NODE_VERSION }}
+ node-version-file: frontend/.nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
diff --git a/.github/workflows/test-frontend-unit.yml b/.github/workflows/test-frontend-unit.yml
index 0ee3ad434..b1c562d71 100644
--- a/.github/workflows/test-frontend-unit.yml
+++ b/.github/workflows/test-frontend-unit.yml
@@ -30,7 +30,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
- node-version: '22'
+ node-version-file: frontend/.nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
@@ -59,7 +59,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v7
with:
- node-version: '22'
+ node-version-file: frontend/.nvmrc
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 574f41dda..c03a32ce7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -3,7 +3,7 @@
![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)
![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)
![Python](https://img.shields.io/badge/python-3.13+-blue.svg)
-![Node.js](https://img.shields.io/badge/node.js-18+-green.svg)
+![Node.js](https://img.shields.io/badge/node.js-24.x-green.svg)
**Thank you for your interest in contributing to OpenRAG!** πŸŽ‰
@@ -77,11 +77,13 @@ If you're a first-time contributor, the [Development Workflows](#development-wor
|------|---------|--------------|
| Docker, Podman, or Colima | Latest | [Docker](https://docs.docker.com/get-docker/), [Podman](https://podman.io/getting-started/installation), or [Colima](https://github.com/abiosoft/colima) |
| Python | 3.13+ | With [uv](https://github.com/astral-sh/uv) package manager |
-| Node.js | 18+ | With npm |
+| Node.js | 24.x (24.15+, see `frontend/.nvmrc`) | With npm 11.x (11.12.1+) |
| Make | Any | Usually pre-installed on macOS/Linux |
You only need one container runtime β€” pick whichever you're comfortable with. On macOS, most contributors use either Colima (lightweight, scriptable, no GUI) or Podman.
+`frontend/.nvmrc` pins only the major version, so `nvm use` can select an installed 24.x older than 24.15, which `make setup` rejects. To fix this, run `nvm install` from `frontend/` to get the latest 24.x. `nvm` only searches upward for `.nvmrc`, so these commands won't find it from the repository root.
+
### Colima Setup (macOS)
[Colima](https://github.com/abiosoft/colima) runs a Linux VM and exposes a standard `docker` CLI/socket, so the Makefile's `docker compose` commands work without any changes β€” it's a drop-in replacement for Docker Desktop.
diff --git a/Makefile b/Makefile
index a8457c212..276069cd5 100644
--- a/Makefile
+++ b/Makefile
@@ -149,15 +149,29 @@ check_tools: ## Verify required tools are installed with correct versions
@command -v node >/dev/null 2>&1 || { echo "$(RED)βœ— Node.js is not installed. Aborting.$(NC)"; exit 1; }
@NODE_VERSION=$$(node --version | sed 's/v//'); \
NODE_MAJOR=$$(echo $$NODE_VERSION | cut -d. -f1); \
- if [ "$$NODE_MAJOR" -lt 18 ]; then \
- echo "$(RED)βœ— Node.js $$NODE_VERSION found, but 18+ required$(NC)"; exit 1; \
+ NODE_MINOR=$$(echo $$NODE_VERSION | cut -d. -f2); \
+ case "$$NODE_MAJOR.$$NODE_MINOR" in \
+ *[!0-9.]*|.*|*.) echo "$(RED)βœ— Could not determine Node.js version (got '$$NODE_VERSION'); ^24.15.0 required$(NC)"; exit 1;; \
+ esac; \
+ if [ "$$NODE_MAJOR" -ne 24 ] || [ "$$NODE_MINOR" -lt 15 ]; then \
+ echo "$(RED)βœ— Node.js $$NODE_VERSION found, but ^24.15.0 required. Install the latest 24.x (nvm: cd frontend && nvm install)$(NC)"; exit 1; \
else \
echo "$(PURPLE)βœ“ Node.js $$NODE_VERSION$(NC)"; \
fi
- @# Check npm
+ @# Check npm (must satisfy frontend/package.json engines: ^11.12.1)
@command -v npm >/dev/null 2>&1 || { echo "$(RED)βœ— npm is not installed. Aborting.$(NC)"; exit 1; }
@NPM_VERSION=$$(npm --version 2>/dev/null || echo "unknown"); \
- echo "$(PURPLE)βœ“ npm $$NPM_VERSION$(NC)"
+ NPM_MAJOR=$$(echo "$$NPM_VERSION" | cut -d. -f1); \
+ NPM_MINOR=$$(echo "$$NPM_VERSION" | cut -d. -f2); \
+ NPM_PATCH=$$(echo "$$NPM_VERSION" | cut -d. -f3 | cut -d- -f1); \
+ case "$$NPM_MAJOR.$$NPM_MINOR.$$NPM_PATCH" in \
+ *[!0-9.]*|.*|*..*|*.) echo "$(RED)βœ— Could not determine npm version (got '$$NPM_VERSION'); ^11.12.1 required$(NC)"; exit 1;; \
+ esac; \
+ if [ "$$NPM_MAJOR" -ne 11 ] || [ "$$NPM_MINOR" -lt 12 ] || { [ "$$NPM_MINOR" -eq 12 ] && [ "$$NPM_PATCH" -lt 1 ]; }; then \
+ echo "$(RED)βœ— npm $$NPM_VERSION found, but ^11.12.1 required. Install: npm install -g npm@11$(NC)"; exit 1; \
+ else \
+ echo "$(PURPLE)βœ“ npm $$NPM_VERSION$(NC)"; \
+ fi
@# Check container runtime
@command -v $(CONTAINER_RUNTIME) >/dev/null 2>&1 || { echo "$(RED)βœ— $(CONTAINER_RUNTIME) is not installed. Aborting.$(NC)"; exit 1; }
@CONTAINER_VERSION=$$($(CONTAINER_RUNTIME) --version 2>/dev/null | head -1 || echo "unknown"); \
diff --git a/frontend/.nvmrc b/frontend/.nvmrc
new file mode 100644
index 000000000..a45fd52cc
--- /dev/null
+++ b/frontend/.nvmrc
@@ -0,0 +1 @@
+24
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 15a8c96db..48ac9d882 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -70,7 +70,7 @@
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@testing-library/user-event": "^14.6.7",
- "@types/node": "^26.0.1",
+ "@types/node": "^24.19.2",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@types/react-syntax-highlighter": "^15.5.13",
@@ -87,7 +87,8 @@
"vitest": "^4.1.11"
},
"engines": {
- "node": ">=22.0.0"
+ "node": "^24.15.0",
+ "npm": "^11.12.1"
}
},
"node_modules/@adobe/css-tools": {
@@ -4076,13 +4077,13 @@
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="
},
"node_modules/@types/node": {
- "version": "26.0.1",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.1.tgz",
- "integrity": "sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==",
+ "version": "24.19.2",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz",
+ "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "undici-types": "~8.3.0"
+ "undici-types": ">=7.24.0 <7.24.7"
}
},
"node_modules/@types/prismjs": {
@@ -9413,9 +9414,9 @@
}
},
"node_modules/undici-types": {
- "version": "8.3.0",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
- "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
+ "version": "7.24.6",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
+ "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
"dev": true,
"license": "MIT"
},
diff --git a/frontend/package.json b/frontend/package.json
index a92f183cf..b184c30da 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -3,7 +3,8 @@
"version": "0.1.0",
"private": true,
"engines": {
- "node": ">=22.0.0"
+ "node": "^24.15.0",
+ "npm": "^11.12.1"
},
"scripts": {
"dev": "next dev",
@@ -83,7 +84,7 @@
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.3",
"@testing-library/user-event": "^14.6.7",
- "@types/node": "^26.0.1",
+ "@types/node": "^24.19.2",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@types/react-syntax-highlighter": "^15.5.13",