Node module version error help

Question:
can someone help me fix this
Repl link:

node index.js
/home/runner/3BotDev/node_modules/bindings/bindings.js:121
        throw e;
        ^

Error: The module '/home/runner/3BotDev/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 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at bindings (/home/runner/3BotDev/node_modules/bindings/bindings.js:112:48)
    at new Database (/home/runner/3BotDev/node_modules/better-sqlite3/lib/database.js:48:64)
    at Object.<anonymous> (/home/runner/3BotDev/node_modules/quick.db/src/index.js:7:15)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/3BotDev/node_modules/quick.db/index.js:7:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
exit status 1

Hey @3rrorOfficialYT welcome back!

Can you provide a link to your Repl so we can look into it further?

https://replit.com/@3rrorOfficialYT/3BotDev
https://replit.com/@3rrorOfficialYT/3BotDev?v=1

hello? please respond

Hey @3rrorOfficialYT, please don’t rush what we are doing, we have other things we do as well. Sorry to keep you waiting, I don’t know Node JS I was just trying to help someone who does with my post. Sorry to ping you @UMARismyname are you able to help out?

1 Like

You have to rebuild better-sqlite3.

The error is complaining that the Node version used to build the better-sqlite3 is different from the Node version being used now.

Delete your node_module directory (which is hidden) and the package-lock.json.

And then run your application again.

If that doesn’t work just rebuild the package (npm rebuild better-sqlite3)

5 Likes

thanks, but it didnt work

The error is the same? Even after you rebuild the package?

yes, i rebuilt the package but the error is the same

yeah, probably that is from the version that you’re using, change the version using the package.json ONLY not replit.nix, and if it works