When I install robotjs with npm install robotjs, it works.
When I install the package from github with
npm install git+https://github.com/octalmage/robotjs.git
(I have to do this way because it seems there is a bug who is only fixed in the gibhub package)
I got this error (on my Windows 2022 server) :
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: Command failed: C:Python312python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm error gyp ERR! stack File "<string>", line 1
npm error gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
npm error gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm error gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm error gyp ERR! stack
npm error gyp ERR! stack at genericNodeError (node:internal/errors:984:15)
npm error gyp ERR! stack at wrappedFn (node:internal/errors:538:14)
npm error gyp ERR! stack at ChildProcess.exithandler (node:child_process:422:12)
npm error gyp ERR! stack at ChildProcess.emit (node:events:518:28)
npm error gyp ERR! stack at maybeClose (node:internal/child_process:1105:16)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error gyp ERR! System Windows_NT 10.0.20348
npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Administrator\AppData\Local\npm-cache\_cacache\tmp\git-cloneXXXXXXNzNMC6\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm error gyp ERR! cwd C:UsersAdministratorAppDataLocalnpm-cache_cacachetmpgit-cloneXXXXXXNzNMC6
npm error gyp ERR! node -v v20.12.2
npm error gyp ERR! node-gyp -v v3.8.0
npm error gyp ERR! not ok
npm error npm error code 1
npm error npm error path C:UsersAdministratorAppDataLocalnpm-cache_cacachetmpgit-cloneXXXXXXNzNMC6
npm error npm error command failed
npm error npm error command C:Windowssystem32cmd.exe /d /s /c prebuild-install || node-gyp rebuild
My Python version is : 3.12.3
Any idea?
Thanks