Code Monkey home page Code Monkey logo

Comments (7)

neoxpert avatar neoxpert commented on June 2, 2024 1

This is not an issue of better-sqlite3 but a known one with node-gyp in combination with Python, which both are required to get the native module compiled. While the prebuilt binaries are not yet available, you might have a look here #1154 (comment).

from better-sqlite3.

neoxpert avatar neoxpert commented on June 2, 2024

Compilation for Electron v29 requires the changes from #1151. So you may either install better-sqlite3 manually from the related branch or downgrade to Electron v28 in order to make use of the prebuilt binary.

from better-sqlite3.

scalgoon avatar scalgoon commented on June 2, 2024

Compilation for Electron v29 requires the changes from #1151. So you may either install better-sqlite3 manually from the related branch or downgrade to Electron v28 in order to make use of the prebuilt binary.

What you linked worked! Thanks.
However I'm now getting this error about node version and online it says to just rebuild again but that doesn't fix anything.

Error: The module '/home/dez/vsc/VideoDeck-V2/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 121. This version of Node.js requires
NODE_MODULE_VERSION 108. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

Any clue about how to fix this? Thanks.

from better-sqlite3.

neoxpert avatar neoxpert commented on June 2, 2024

That means that, while you now have a version of better-sqlite3 compiled for Electron v29 (module version 121), the actual runtime loading the native module is Node 18 (module version 108). My best guess would be, that your start script is not calling Electron for execution.

from better-sqlite3.

sethyuan avatar sethyuan commented on June 2, 2024

After upgrade to 9.4.4 and electron 29.1.6, I get this error when running yarn electron-rebuild:

⠋ Building module: better-sqlite3, Completed: 0Traceback (most recent call last):
File "/Users/x/dev/y/node_modules/node-gyp/gyp/gyp_main.py", line 42, in
import gyp # noqa: E402
^^^^^^^^^^
File "/Users/x/dev/y/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 9, in
import gyp.input
File "/Users/x/dev/y/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in
from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'
Error: gyp failed with exit code: 1
at ChildProcess.onCpExit (/Users/x/dev/y/node_modules/node-gyp/lib/configure.js:325:16)
at ChildProcess.emit (node:events:518:28)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)

✖ Rebuild Failed

from better-sqlite3.

sethyuan avatar sethyuan commented on June 2, 2024

Thank you @neoxpert for the information, it fixed my issue.

from better-sqlite3.

mceachen avatar mceachen commented on June 2, 2024

This is fixed in https://github.com/WiseLibs/better-sqlite3/releases/tag/v9.4.5

from better-sqlite3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.