How to use sqlite3 module with electron?

前端 未结 10 1392
隐瞒了意图╮
隐瞒了意图╮ 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条回答
  •  悲&欢浪女
    2020-11-28 02:35

    I encounter this error too. Here is how i solve it: npm install --save-dev electron-rebuild then: ./node_modules/.bin/electron-rebuild

    from: https://electronjs.org/docs/tutorial/using-native-node-modules

    ps: While it's on rebuilding, don't use npm startto lanch the electron app. Otherwise the rebuild process would fail.

提交回复
热议问题