为电子应用程序重建SQLite3时出错

时间:2018-09-28 17:33:46

标签: node.js sqlite electron

我正在尝试安装sqlite3,以通过Windows在Electron中制作一个应用程序。我放入了package.json:

"rebuild": "electron-rebuild -f -w sqlite3"

当我跑步时:

npm run rebuild

我收到此错误:

Error: The projects of this solution will be compiled one at a time. To enable compilation in parallel, add the "/ m" switch.
D:\WindowsDev\CopyWatcher\node_modules\sqlite3\build\deps\action_before_build.vcxproj(20,3): error MSB4019: The imported project "D: \ Microsoft.Cpp.Default.props" can not be found. Make sure that the path of the <Import> declaration is correct and that the file is on the disk.
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\WindowsDev\CopyWatcher\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\WindowsDev\\CopyWatcher\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=2.0.10" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=node_sqlite3" "--module_path=D:\\WindowsDev\\CopyWatcher\\node_modules\\sqlite3\\lib\\binding\\electron-v2.0-win32-x64" "--host=https://mapbox-node-binary.s3.amazonaws.com" "--remote_path=./{name}/v4.0.2/{toolset}/" "--package_name=electron-v2.0-win32-x64.tar.gz"
gyp ERR! cwd D:\WindowsDev\CopyWatcher\node_modules\sqlite3
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

1 个答案:

答案 0 :(得分:0)

我安装了Visual Studio Developer Tools 2015,而sqlite3模块运行良好!