-
-
Notifications
You must be signed in to change notification settings - Fork 423
Description
An error occured during running jest tests:
The module '/Users/user/node-js-app/node_modules/better-sqlite3/build/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 69. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, usingnpm rebuild
ornpm install
).
at Runtime.requireModule (node_modules/jest-runtime/build/index.js:372:31)
at Object.<anonymous> (node_modules/better-sqlite3/lib/database.js:5:21)
jest version: 23.6.0
better-sqlite3 version: 5.4.0
My app running at NODE_MODULE_VERSION 69 (better-sqlite3 also being compiled using 69 version of node), but things looks like that jest runtime used different version of node (64).
Currently I am going around with this problem running npm rebuild
(which recompiles better-sqlite3 to 64 version of node) before tests, but after that application becoming broken (app required better-sqlite3 compiled with 69 version of node).
Anyone has an idea how to fix this problem correctly?