sqlite3电子重建错误:要启用并行构建,请添加“ / m”开关

时间:2019-04-25 13:00:25

标签: sqlite electron

我正在尝试重建sqlite3以与电子配合使用。我已经克隆了electron quickstart application的新副本,并遵循了以下stack-overflow answer。但是,在运行npm run postinstall时,出现以下错误:

Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
Configuring yargs through package.json is deprecated and will be removed in the next major release, please use the JS API instead.
  • electron-builder version=20.39.0
  • rebuilding native production dependencies platform=win32 arch=x64
Error: c:\Program Files\nodejs\node.exe exited with code 1
Output:

> sqlite3@4.0.6 install C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\sqlite3
> node-pre-gyp install --fallback-to-build

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\sqlite3\build\deps\action_before_build.vcxproj]
Failed to execute 'c:\program files\nodejs\node.exe c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\sqlite3\lib\binding\electron-v4.1-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\sqlite3\lib\binding\electron-v4.1-win32-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v4.1' (1)

Error output:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.6/electron-v4.1-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.6 and electron@4.1.4 (electron-v4.1 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "c:\\program files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\Admin\\Desktop\\electron-quick-start-master (1)\\electron-quick-start-master\\node_modules\\sqlite3\\lib\\binding\\electron-v4.1-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\Admin\\Desktop\\electron-quick-start-master (1)\\electron-quick-start-master\\node_modules\\sqlite3\\lib\\binding\\electron-v4.1-win32-x64" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=electron-v4.1"
gyp ERR! cwd C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\sqlite3
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'c:\program files\nodejs\node.exe c:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\sqlite3\lib\binding\electron-v4.1-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\sqlite3\lib\binding\electron-v4.1-win32-x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v4.1' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.17763
node-pre-gyp ERR! command "c:\\program files\\nodejs\\node.exe" "C:\\Users\\Admin\\Desktop\\electron-quick-start-master (1)\\electron-quick-start-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\sqlite3
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.0.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.0.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Admin\AppData\Roaming\npm-cache\_logs\2019-04-25T12_50_30_206Z-debug.log

    at ChildProcess.childProcess.once.code (C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\builder-util\src\util.ts:244:14)
    at Object.onceWrapper (events.js:277:13)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
From previous event:
    at _rebuild (C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\app-builder-lib\src\util\yarn.ts:179:5)
    at rebuild (C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\app-builder-lib\out\util\yarn.js:163:19)
    at C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\app-builder-lib\src\util\yarn.ts:20:11
From previous event:
    at _installOrRebuild (C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\app-builder-lib\out\util\yarn.js:71:28)
    at installOrRebuild (C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\app-builder-lib\out\util\yarn.js:55:28)
    at C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\electron-builder\src\cli\install-app-deps.ts:56:9
    at Generator.next (<anonymous>)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at _installAppDeps (C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\electron-builder\out\cli\install-app-deps.js:176:26)
    at installAppDeps (C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\electron-builder\out\cli\install-app-deps.js:144:26)
    at then (C:\Users\Admin\Desktop\electron-quick-start-master (1)\electron-quick-start-master\node_modules\electron-builder\src\cli\cli.ts:46:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron-quick-start@1.0.0 postinstall: `electron-builder install-app-deps`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-quick-start@1.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Admin\AppData\Roaming\npm-cache\_logs\2019-04-25T12_50_30_245Z-debug.log

您的帖子似乎主要是代码;请添加更多详细信息。 看起来您的帖子大部分是代码;请添加更多详细信息。 看起来您的帖子大部分是代码;请添加更多详细信息。 看起来您的帖子大部分是代码;请添加更多详细信息。 看起来您的帖子大部分是代码;请添加更多详细信息。 看起来您的帖子大部分是代码;请添加更多详细信息。 看起来您的帖子大部分是代码;请添加更多详细信息。

0 个答案:

没有答案