From 5cc467f7f67c796f6e0566710b7a8221e9993009 Mon Sep 17 00:00:00 2001 From: David Snelling Date: Thu, 28 Aug 2025 16:05:14 -0700 Subject: [PATCH] feat: update Node.js requirements to 22 LTS for ONNX compatibility - Update package.json engines to require Node.js >=22.0.0 - Add .nvmrc file specifying Node.js 22 - Document Node.js version requirements in README - Add warning about Node.js 24 ONNX runtime compatibility issues - Provide clear guidance for production deployments This addresses known crashes during inference operations on Node.js 24 while ensuring maximum stability with the latest LTS version. --- .nvmrc | 1 + README.md | 12 ++++++++++++ package.json | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..8fdd954d --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 \ No newline at end of file diff --git a/README.md b/README.md index 58200820..bba48682 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,18 @@ const filtered = await brain.find({ }) ``` +## 📋 System Requirements + +**Node.js Version:** 22 LTS or later (recommended) + +- ✅ **Node.js 22 LTS** - Fully supported and recommended for production +- ✅ **Node.js 20 LTS** - Compatible (maintenance mode) +- ❌ **Node.js 24** - Not supported (known ONNX runtime compatibility issues) + +> **Important:** Brainy uses ONNX runtime for AI embeddings. Node.js 24 has known compatibility issues that cause crashes during inference operations. We recommend Node.js 22 LTS for maximum stability. + +If using nvm: `nvm use` (we provide a `.nvmrc` file) + ## 🚀 Key Features ### World's First Triple Intelligence™ Engine diff --git a/package.json b/package.json index 9d822d3d..5dd9e3de 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ } }, "engines": { - "node": ">=18.0.0" + "node": ">=22.0.0" }, "scripts": { "build": "npm run build:patterns:if-needed && tsc",