TryGhost / node-sqlite3

SQLite3 bindings for Node.js
BSD 3-Clause "New" or "Revised" License
6.23k stars 817 forks source link

electron v30.0.1 install error #1782

Open 82318179 opened 6 months ago

82318179 commented 6 months ago

Issue Summary

Script name: postinstall

• electron-builder version=24.13.3 • loaded configuration file=E:\Dev\testdd\electron-builder.yml • rebuilding native dependencies dependencies=sqlite3@5.1.7 platform=win32 arch=x64 • install prebuilt binary name=sqlite3 version=5.1.7 platform=win32 arch=x64 napi=
• build native dependency from sources name=sqlite3 version=5.1.7 platform=win32 arch=x64 napi=pl reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information) error=prebuild-install info begin Prebuild-install version 7.1.2 prebuild-install warn This package does not support N-API version 36 prebuild-install warn install prebuilt binaries enforced with --force! prebuild-install warn install prebuilt binaries may be out of date! prebuild-install info looking for local prebuild @ prebuilds\sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz prebuild-install info looking for cached prebuild @ C:\Users\Admin\AppData\Roaming\npm-cache_prebuilds\69004f-sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz prebuild-install http request GET https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz prebuild-install http 404 https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz prebuild-install warn install No prebuilt binaries found (target=36 runtime=napi arch=x64 libc= platform=win32)

• rebuilding native dependency name=sqlite3 version=5.1.7 ⨯ cannot execute cause=exit status 1 out=在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。

  unpack_sqlite_dep
  sqlite3.c
  win_delay_load_hook.cc
  sqlite3.vcxproj -> E:\Dev\testdd\node_modules\sqlite3\build\Release\\sqlite3.lib
  nothing.c
  win_delay_load_hook.cc
  nothing.vcxproj -> E:\Dev\testdd\node_modules\sqlite3\build\Release\\nothing.lib
  backup.cc
  database.cc
  node_sqlite3.cc
  statement.cc
  win_delay_load_hook.cc
LINK : fatal error LNK1181: 无法打开输入文件“C:\\Users\\Admin\\.electron-gyp\\30.0.2\\x64\\node.lib” [E:\Dev\testdd\node_modules\sqlite3\build\node_sqlite3.vcxproj]

                errorOut=prebuild-install warn This package does not support N-API version 30.0.2
prebuild-install warn install No prebuilt binaries found (target=30.0.2 runtime=napi arch=x64 libc= platform=win32)
gyp info it worked if it ends with ok
gyp info using no | x64de-gyp@8.4.1
gyp info using node@20.12.2 | win32
gyp info find Python using Python version 3.12.3 found at "C:\Program Files\Python312\python.exe"
gyp info find VS using VS2022 (17.6.33723.286) found at:
gyp info find VS "d:\Program Files\Microsoft Visual Studio\2022\Professional"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Program Files\Python312\python.exe
gyp info spawn args [
gyp info spawn args   'E:\\Dev\\testdd\\node_modules\\sqlite3\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'E:\\Dev\\testdd\\node_modules\\sqlite3\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'E:\\Dev\\testdd\\node_modules\\sqlite3\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Admin\\.electron-gyp\\30.0.2\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Admin\\.electron-gyp\\30.0.2',
gyp info spawn args   '-Dnode_gyp_dir=E:\\Dev\\testdd\\node_modules\\sqlite3\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Admin\\\\.electron-gyp\\\\30.0.2\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=E:\\Dev\\testdd\\node_modules\\sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'E:\\Dev\\testdd\\node_modules\\sqlite3\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn d:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn args [
gyp info spawn args   'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
gyp ERR! build error 
gyp ERR! stack Error: `d:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (E:\Dev\testdd\node_modules\sqlite3\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Windows_NT 10.0.22631
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Dev\\testdd\\node_modules\\sqlite3\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\Dev\testdd\node_modules\sqlite3
gyp ERR! node -v v20.12.2
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok 

                command='C:\Users\Admin\AppData\Local\Temp\xfs-c40d6163\yarn' run install
                workingDir=E:\Dev\testdd\node_modules\sqlite3

Steps to Reproduce

1、yarn

Version

5.1.7

Node.js Version

20.12.2

How did you install the library?

yarn

lily10 commented 4 months ago

I have the same problem

TuKun33 commented 3 months ago

I also couldn't find the remote dependency when packing, but it will to be try rebuilt from native dependency; try to rebuild local dependency

electron-rebuild -f -w sqlite3

jingpengju391 commented 2 months ago

I was wordless to find that prebuild-install url sqlite3-v5.1.7-napi-v36-win32-x64.tar.gz 404 and i try v36 change v6 at local, it's right!!!