How to use sqlite3 module with electron?

前端 未结 10 1389
隐瞒了意图╮
隐瞒了意图╮ 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:26

    You can manually build the native modules using visual studio.

    1. Download visual studio 2019.
    2. Install package "desktop development with c++". In installation details tab select "MSVC v140 - VS 2015 C++ build tools (v14.00)"
    3. Download electron-builder in your project.
    4. In package.json create a script. "scripts": { "postinstall": "install-app-deps" }

    5. then run the script.

提交回复
热议问题