electron-vue 操作sqlite3 環境安裝以及編譯
阿新 • • 發佈:2019-02-17
開始步驟
windows electron安裝原生node模組 首先安裝 vs2015 包括vsc++ 接著安裝: 1. npm install -g node-gyp npm install -g node-pre-gyp npm install --global --production windows-build-tools 2.然後安裝sqlite3 npm install sqlite3 或則 yarn add sqlite3(需要安裝yarn) 接著cd到node_module/sqlite3 3.執行以下命令 node-gyp rebuild --target=1.7.12 --arch=x64 --target_platform=win32 --dist-url=https://atom.io/download/electron/ --module_name=node_sqlite3 --module_path=../lib/binding/electron-v1.7-win32-x64 --target是electron的版本 這裡使用了1.4.3才成功安裝 --module_path 設定路徑 注意 electron-v1.4這個 必須和--target一樣的版本