There's a version mismatch between the SQLite version being used and the better-sqlite3 module

Description

when npm install runs to:

it runs the command below actually:

npm install better-sqlite3@^11.0.0 --no-save --no-audit --build-from-source --sqlite3="/src/Mailspring/app/build/sqlite-amalgamation"

and report bugs:

npm ERR! ./src/util/constants.lzz:98:34: error: use of undeclared identifier 'SQLITE_IOERR_IN_PAGE'
npm ERR!    98 |                 SetCode(isolate, SQLITE_IOERR_IN_PAGE, "SQLITE_IOERR_IN_PAGE");
npm ERR!       |                                  ^
npm ERR! ./src/util/constants.lzz:133:34: error: use of undeclared identifier 'SQLITE_NOTICE_RBU'
npm ERR!   133 |                 SetCode(isolate, SQLITE_NOTICE_RBU, "SQLITE_NOTICE_RBU");

this error occurs because there’s a version mismatch between the SQLite version being used and the better-sqlite3 module.

when i run:
npm install better-sqlite3@^8.0.1 --no-save --no-audit --build-from-source --sqlite3="/src/Mailspring/app/build/sqlite-amalgamation"
, not surprising, it scuueeds .

To Reproduce…

Steps to reproduce the behavior:

just Running Mailspring from Source
npm install

Expected Behavior

no error

Screenshots

Setup

  • OS and Version:
    • Installation Method:
      Ubuntu Linux 20.04
  • Mailspring Version:
    newest

Additional Context

Error Downloading Update: Could not get code signature for running application
Error Downloading Update: Could not get code signature for running application
Error: The module '/Users/kevinhu/Documents/github-personal/Mailspring/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 130. Please try re-compiling or re-installing

Any update on this ?

Setup
Mac M3
node: v16.17.0
Mailspring: latest main
better-sqlite3@11.10.0