Skip to content

Not working with new nodejs version 24 #1376

Description

@dean-github

Hi all,
Just wanted to report the incompatibility with new version as below, took me some time to know why.

When running with new version of nodejs 24, the app would crash on db connection line with no specific error:
db = require('better-sqlite3')(dbFile);

If you downgrade to v22, it would work normally.

Understand it's new version and better-sqlite3 not updated for it yet.
Hope this can work with v24 soon.

Best regards,

Activity

  1. neoxpert commented on May 27, 2025

    @neoxpert
    Contributor

    NodeJS 24 is covered by the build pipelines including tests.

    Can you provide logs containing the actual error and provide more context / details?

  2. mceachen commented on May 27, 2025

    @mceachen
    Member
  3. dean-github commented on May 28, 2025

    @dean-github
    Author

    Thanks guy, turned out it's the build issue was for earlier version as mentioned below. I'll try with rebuild and see how it goes.

    Error: The module '\\?\C:\Users\dean\.vscode\nodejs\node_modules\better-sqlite3\build\Release\better_sqlite3.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 127. This version of Node.js requires
    NODE_MODULE_VERSION 137. Please try re-compiling or re-installing the module
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions