Skip to content

fix: improve Node.js v25 compatibility for better-sqlite3#1212

Open
salws wants to merge 1 commit intoMemTensor:openclaw-local-plugin-20260324from
salws:main
Open

fix: improve Node.js v25 compatibility for better-sqlite3#1212
salws wants to merge 1 commit intoMemTensor:openclaw-local-plugin-20260324from
salws:main

Conversation

@salws
Copy link

@salws salws commented Mar 11, 2026

  • Update better-sqlite3 to v12.6.3 for better compatibility
  • Add Node version upper bound (<25.0.0) in engines field
  • Add Node v25 detection warning in postinstall script
  • Improve error messages for v25+ users with fallback options

Description

Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change.

Related Issue (Required): Fixes @issue_number

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit Test
  • Test Script Or Test Steps (please provide)
  • Pipeline Automated API Test (please provide)

Checklist

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

Reviewer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed
  • Tests have been provided

- Update better-sqlite3 to v12.6.3 for better compatibility
- Add Node version upper bound (<25.0.0) in engines field
- Add Node v25 detection warning in postinstall script
- Improve error messages for v25+ users with fallback options
@hijzy hijzy changed the base branch from main to openclaw-local-plugin-20260324 March 24, 2026 11:51
@hijzy
Copy link
Collaborator

hijzy commented Mar 24, 2026

PR Review

This PR addresses Node.js v25 compatibility by: (1) adding <25.0.0 upper bound to engine requirements in package.json, (2) bumping better-sqlite3 from ^12.6.2 to ^12.6.3, and (3) adding early detection warnings in postinstall.cjs when Node.js v25+ is detected, suggesting users switch to LTS via nvm.

The approach is defensive and informative rather than attempting to fix underlying native module incompatibilities. The warning messages are clear and actionable. The engine constraint properly prevents installation on incompatible Node versions.

此 PR 通过添加引擎上限、升级 better-sqlite3 版本、在 postinstall 中添加 v25+ 检测警告来应对 Node.js v25 兼容性问题。策略是防御性提示而非尝试修复底层兼容问题,警告信息清晰可操作,作为临时解决方案合理有效。

  • Safety: ✅ Safe
  • Mergeable: ✅ Yes
  • Confidence: 5/5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants