Skip to content

nstallation Failure on Node.js 26.x due to better-sqlite3 Native Build Errors #46

Description

@MyriadColors

What happened?

Markdown

Issue: Installation Failure on Node.js 26.x due to better-sqlite3 Native Build Errors

Environment

  • OS: Windows 11 (via Scoop)
  • Node.js Version: 26.3.1
  • Package Version: @juliusbrussee/caveman-code (using better-sqlite3@11.10.0)

Description

Installation fails globally when npm attempts to compile the native dependency better-sqlite3@11.10.0. Node.js 26 introduces breaking changes to the internal V8 engine API, removing deprecated methods that the 11.x branch of better-sqlite3 relies on. Because no prebuilt binaries exist for this specific combination, node-gyp attempts a local compilation via MSVC, which rejects the source files.

Error Log Snippet

npm error C:<path_to_node_modules>@juliusbrussee\caveman-code\node_modules\better-sqlite3\build\src\util\binder.lzz(40,37): error C2039: 'GetPrototype': is not a member of 'v8::Object'
npm error C:<path_to_node_modules>@juliusbrussee\caveman-code\node_modules\better-sqlite3\build\src\better_sqlite3.lzz(68,34): error C2039: 'GetIsolate': is not a member of 'v8::Context'
npm error C:<path_to_node_modules>@juliusbrussee\caveman-code\node_modules\better-sqlite3\build\src\objects\database.lzz(416,89): error C2039: 'This': is not a member of 'v8::PropertyCallbackInfo[v8::Value](https://www.google.com/search?q=v8::Value)'
npm error gyp ERR! build error
npm error gyp ERR! stack Error: MSBuild.exe failed with exit code: 1

Suggested Resolution

Upstream maintainers fixed these V8 compilation errors in better-sqlite3 version 12.x. Please update the package.json dependency tree to require better-sqlite3 ^12.0.0 or higher to allow successful installation on modern Node.js environments.

Steps to reproduce

Steps to Reproduce

  1. Install Node.js version 26.x on a Windows machine.
  2. Open a terminal interface.
  3. Run the following global installation command:
   npm install -g @juliusbrussee/caveman-code
  1. Observe the native compilation phase triggering via node-gyp.
  2. The process terminates with compilation errors similar to the provided log snippet.

Expected behavior

Expected Behavior

The package @juliusbrussee/caveman-code should install globally without compilation errors. The setup process should either fetch compatible prebuilt binaries for the active runtime or compile the native C++ components cleanly against modern Node.js versions without crashing on deprecated V8 internal methods.

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions