#rebuild problems on Windows.

12 messages · Page 1 of 1 (latest)

patent granite
#
better_sqlite3.node

was compiled against a different Node.js version using
NODE_MODULE_VERSION 119. This version of Node.js requires
NODE_MODULE_VERSION 108. Please try re-compiling or re-installing
#

rebuild problems on Windows.

#

using pnpm, and electron-vite

#

never had any problems running "install-app-deps" before this package

#

tried node versions: 16, 18, 20, 21...

#

gives this but still gives the error above

patent granite
#

I am losing my mind 123

#

how I got it to work? XD:

  1. remove all build/generated folders, remove node modules
  2. pnpm install
  3. pnpm run postinstall (if wasn't run automatically)
  4. npm install better-sqlite3 --build-from-source --runtime=electron --target=21.3.0 --dist-url=https://electronjs.org/headers --force

make sure your target matches your node version
(check: node -v, or nvm list)

yes, you read that right. Now it's using two package managers but somehow that is the only way I get my code to run :DDDD.
I tried this same process with npm only and nothing

#

I have no clue anymore about anything. Countless of github issue threads later I am more lost than ever

#

indexeddb starts looking hotter minute by minute