node-twain
node-twain copied to clipboard
在我的electron-vite项目中安装报错
我本地还有sqlite和serialport两个库,都可以正常安装编译 node环境:18.19.0 32和64都尝试过 报错信息:
if not defined npm_config_node_gyp (node "C:\Users\MrChildren\AppData\Roaming\nvm\v18.19.0\node_
│ gyp info it worked if it ends with ok
│ gyp info using [email protected]
│ gyp info using [email protected] | win32 | x64
│ gyp info find Python using Python version 3.10.4 found at "C:\Users\MrChildren\AppData\Local\Programs\Python\Python310\python.exe"
│ gyp info find VS using VS2022 (17.6.33723.286) found at:
│ gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
│ gyp info find VS run with --verbose for detailed information
│ gyp info spawn C:\Users\MrChildren\AppData\Local\Programs\Python\Python310\python.exe
│ gyp info spawn args [
│ gyp info spawn args 'C:\Users\MrChildren\AppData\Roaming\nvm\v18.19.0\node_modules\pnpm\dist\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 'D:\opulenDev\windows\flashtest-client\node_modules\node-twain\build\config.gypi',
│ gyp info spawn args '-I',
│ gyp info spawn args 'C:\Users\MrChildren\AppData\Roaming\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-gyp\addon.gypi',
│ gyp info spawn args '-I',
│ gyp info spawn args 'C:\Users\MrChildren\AppData\Local\node-gyp\Cache\18.19.0\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\MrChildren\AppData\Local\node-gyp\Cache\18.19.0',
│ gyp info spawn args '-Dnode_gyp_dir=C:\Users\MrChildren\AppData\Roaming\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-gyp',
│ gyp info spawn args '-Dnode_lib_file=C:\\Users\\MrChildren\\AppData\\Local\\node-gyp\\Cache\\18.19.0\\<(target_arch)\\node.lib',
│ gyp info spawn args '-Dmodule_root_dir=D:\opulenDev\windows\flashtest-client\node_modules\node-twain',
│ 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 'D:\opulenDev\windows\flashtest-client\node_modules\node-twain\build',
│ gyp info spawn args '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Enterprise\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 ]
│ �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ������ӡ�-m�����ء�
│ main.cpp
│ TwainSession.cpp
│ TwainSDK.cpp
│ win_delay_load_hook.cc
│ LINK : fatal error LNK1181: ���������ļ���C:\Users\MrChildren\AppData\Local\node-gyp\Cache\18.19.0\x64\node.lib�� [D:\opulenDev\windows\flashtest-cli
│ gyp ERR! build error
│ gyp ERR! stack Error: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\MSBuild.exe
failed with exit code: 1
│ gyp ERR! stack at ChildProcess.onExit (C:\Users\MrChildren\AppData\Roaming\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-gyp\lib\build.js:203:23)
│ gyp ERR! stack at ChildProcess.emit (node:events:517:28)
│ gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12)
│ gyp ERR! System Windows_NT 10.0.22631
│ gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\MrChildren\AppData\Roaming\nvm\v18.19.0\node_modules\pnpm\dist\node_modules\node-g
│ gyp ERR! cwd D:\opulenDev\windows\flashtest-client\node_modules\node-twain
│ gyp ERR! node -v v18.19.0
│ gyp ERR! node-gyp -v v9.3.1
│ gyp ERR! not ok
└─ Failed in 2.9s at D:\opulenDev\windows\flashtest-client\node_modules\node-twain
Progress: resolved 1090, reused 1043, downloaded 1, added 5, done
node_modules/vue-demi: Running postinstall script, done in 143ms
node_modules/vue-echarts/node_modules/vue-demi: Running postinstall script, done in 117ms
ELIFECYCLE Command failed with exit code 1.