How to use sqlite3 module with electron?

前端 未结 10 1379
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 01:43

I want to develop desktop app using electron that uses sqlite3 package installed via npm with the command

npm install --save sqlite3

but it

10条回答
  •  萌比男神i
    2020-11-28 02:41

    A simpler solution:

    1. Install electron-rebuild npm i electron-rebuild --save-dev
    2. Launch electron-rebuild ./node_modules/.bin/electron-rebuild (or .\node_modules\.bin\electron-rebuild.cmd on windows)
    3. Go to "node_modules/sqlite3/lib/binding/" and rename the folder "electron-v0.36-darwin-x64" to "node-v47-darwin-x64"

    PS: v47 is my version, be careful to choose the good one (in your case v45)

提交回复
热议问题