octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.37k stars 961 forks source link

yarn add robotjs throw error #599

Closed myesn closed 4 years ago

myesn commented 4 years ago

$ yarn add robotjs yarn add v1.22.4 info No lockfile found. [1/4] Resolving packages... [2/4] Fetching packages... [3/4] Linking dependencies... [4/4] Building fresh packages... error C:\dev\test\node.js\robotjs\node_modules\robotjs: Command failed. Exit code: 1 Command: prebuild-install || node-gyp rebuild Arguments: Directory: C:\dev\test\node.js\robotjs\node_modules\robotjs Output: prebuild-install WARN install No prebuilt binaries found (target=12.18.0 runtime=node arch=x64 libc= platform=win32)

C:\dev\test\node.js\robotjs\node_modules\robotjs>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) gyp info it worked if it ends with ok gyp info using node-gyp@5.1.0 gyp info using node@12.18.0 | win32 | x64 gyp info find Python using Python version 3.8.5 found at "C:\Users\myesn\AppData\Local\Programs\Python\Python38-32\python.exe" gyp info find VS using VS2019 (16.7.30413.136) found at: gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" gyp info find VS run with --verbose for detailed information gyp info spawn C:\Users\myesn\AppData\Local\Programs\Python\Python38-32\python.exe gyp info spawn args [ gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\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 'C:\dev\test\node.js\robotjs\node_modules\robotjs\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\myesn\AppData\Local\node-gyp\Cache\12.18.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\myesn\AppData\Local\node-gyp\Cache\12.18.0', gyp info spawn args '-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=C:\\Users\\myesn\\AppData\\Local\\node-gyp\\Cache\\12.18.0\\<(target_arch)\\node.lib', gyp info spawn args '-Dmodule_root_dir=C:\dev\test\node.js\robotjs\node_modules\robotjs', 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 'C:\dev\test\node.js\robotjs\node_modules\robotjs\build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\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�����ء� robotjs.cc win_delay_load_hook.cc C:\dev\test\node.js\robotjs\node_modules\robotjs\src\os.h(26,1): warning C4005: ��STRICT��: ���ض��� (����Դ�ļ� ..\src\robotjs.cc) [C:\dev\test\node.js\robotjs\node_modules\robotjs\build\robotjs.vcxproj] C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\minwindef.h(23): message : �μ���STRICT����ǰһ������ (����Դ�ļ� ..\src\robotjs.cc) [C:\dev\test\node.js\robotjs\node_modules\robotjs\build\robotjs.vcxproj] deadbeef_rand.c mouse.c keypress.c keycode.c screen.c screengrab.c snprintf.c MMBitmap.c C:\Users\myesn\AppData\Local\node-gyp\Cache\12.18.0\x64\node.lib : fatal error LNK1106: �ļ���Ч���������: �޷����ҵ� 0x2FCB2A [C:\dev\test\node.js\robotjs\node_modules\robotjs\build\robotjs.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\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:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Windows_NT 10.0.18363 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\dev\test\node.js\robotjs\node_modules\robotjs gyp ERR! node -v v12.18.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Your Environment