Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows - Fail to install robotjs multiple errors: MSB4019 & C2500 & C2600 #486

Closed
jimfangx opened this issue May 20, 2019 · 18 comments
Closed
Milestone

Comments

@jimfangx
Copy link

jimfangx commented May 20, 2019

NPM fails to install robotjs on windows. There are multiple errors. I got the following error the first time I ran npm i robotjs after installing windows build tools and node-gyp. Error: error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.. Then after I closed and reopened VS Code and ran the same command again, I got a full page or errors:

$ npm i robotjs

> robotjs@0.5.1 install D:\Projects\Spotify-Muter\node_modules\robotjs
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.2.0 runtime=node arch=x64 platform=win32)

D:\Projects\Spotify-Muter\node_modules\robotjs>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  robotjs.cc
  win_delay_load_hook.cc
d:\projects\spotify-muter\node_modules\robotjs\src\os.h(26): warning C4005: 'STRICT': macro redefinition (compiling source file ..\src\robotjs.cc) [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.v
cxproj]
  C:\Program Files (x86)\Windows Kits\8.1\Include\shared\minwindef.h(23): note: see previous definition of 'STRICT' (compiling source file ..\src\robotjs.cc)
..\src\robotjs.cc(63): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(63): error C2789: 'x': an object of const-qualified type must be initialized [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj] 
  ..\src\robotjs.cc(63): note: see declaration of 'x'
..\src\robotjs.cc(64): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(64): error C2789: 'y': an object of const-qualified type must be initialized [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj] 
  ..\src\robotjs.cc(64): note: see declaration of 'y'
..\src\robotjs.cc(97): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(98): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(114): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(115): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(143): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(143): error C2512: 'v8::String::Utf8Value::Utf8Value': no appropriate default constructor available [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(159): error C2661: 'v8::Value::BooleanValue': no overloaded function takes 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(239): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(251): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(252): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(418): error C2039: 'Handle': is not a member of 'v8' [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\jim fang\.node-gyp\12.2.0\include\node\v8-platform.h(16): note: see declaration of 'v8'
..\src\robotjs.cc(418): error C2065: 'Handle': undeclared identifier [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(418): error C2275: 'v8::Value': illegal use of this type as an expression [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
  ..\src\robotjs.cc(418): note: see declaration of 'v8::Value'
..\src\robotjs.cc(418): error C2065: 'value': undeclared identifier [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(418): error C2065: 'flags': undeclared identifier [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(418): error C2275: 'MMKeyFlags': illegal use of this type as an expression [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
  d:\projects\spotify-muter\node_modules\robotjs\src\keypress.h(50): note: see declaration of 'MMKeyFlags'
..\src\robotjs.cc(419): error C2448: 'GetFlagsFromString': function-style initializer appears to be a function definition [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(424): error C2039: 'Handle': is not a member of 'v8' [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\jim fang\.node-gyp\12.2.0\include\node\v8-platform.h(16): note: see declaration of 'v8'
..\src\robotjs.cc(424): error C2065: 'Handle': undeclared identifier [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(424): error C2275: 'v8::Value': illegal use of this type as an expression [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
  ..\src\robotjs.cc(424): note: see declaration of 'v8::Value'
..\src\robotjs.cc(424): error C2065: 'value': undeclared identifier [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(424): error C2065: 'flags': undeclared identifier [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(424): error C2275: 'MMKeyFlags': illegal use of this type as an expression [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
  d:\projects\spotify-muter\node_modules\robotjs\src\keypress.h(50): note: see declaration of 'MMKeyFlags'
..\src\robotjs.cc(425): error C2448: 'GetFlagsFromValue': function-style initializer appears to be a function definition [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(457): error C2661: 'v8::Value::ToString': no overloaded function takes 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(457): error C2512: 'v8::String::Utf8Value::Utf8Value': no appropriate default constructor available [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(463): error C2064: term does not evaluate to a function taking 2 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(515): error C2064: term does not evaluate to a function taking 2 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(589): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(603): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(639): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(640): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(708): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(709): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(710): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(711): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(768): error C2660: 'v8::Value::Uint32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(769): error C2660: 'v8::Value::Uint32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(770): error C2660: 'v8::Value::Uint32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(771): error C2660: 'v8::Value::Uint32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(772): error C2660: 'v8::Value::Uint32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(774): warning C4996: 'v8::Object::Get': was declared deprecated [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\jim fang\.node-gyp\12.2.0\include\node\v8.h(3412): note: see declaration of 'v8::Object::Get'
..\src\robotjs.cc(788): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
..\src\robotjs.cc(789): error C2660: 'v8::Value::Int32Value': function does not take 0 arguments [D:\Projects\Spotify-Muter\node_modules\robotjs\build\robotjs.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.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:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)
gyp ERR! System Windows_NT 10.0.18362
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 D:\Projects\Spotify-Muter\node_modules\robotjs
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN spotify_muter@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! robotjs@0.5.1 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the robotjs@0.5.1 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\Jim Fang\AppData\Roaming\npm-cache\_logs\2019-05-20T02_34_16_256Z-debug.log

I will provide the debug log of both of these runs below in the logs section. Also when installing the latest version of windows build tools (5.1.0) the shell freezes after installing python 2.7. See my comment here for a screenshot: #398 (comment)
So I just ended up installing 4.0.0 of the build tools instead of 5.1.0

Expected Behavior

robotjs to be installed successfully.

Current Behavior

NPM installation to install robotjs is erroring.

Possible Solution

No idea.

Steps to Reproduce (for bugs)

  1. npm i robotjs (With or without windows build tools & node-gyp)

Context

I am trying to use robotjs in an electron app, but this technically should not matter since I am having trouble to get the thing to even install correctly.

Your Environment

  • RobotJS version: Latest from npm i robotjs (0.5.1)
  • Node.js version: 12.2.0
  • npm version: 6.9.0
  • Operating System: Windows 10 Home 1903 Build 18362.113

Steps taken to try to fix:

Referenced these issues:
#253
#264
#398
Nothing worked even after I manually installed and reinstalled windows build tools for about 7 times. Also manually installing node-gyp did not help either.

Logs

1st run (the one before I closed VS Code, run without the page full of errors. This was right after windows build tools finished in an admin cmd): https://pastebin.com/H7p996Tc (debug logs are 1800 lines long, so I decided it would be a good idea not to post them here)

2nd run (after restarting VS Code): https://pastebin.com/nJfQ3hZC

Here is the log of windows build tools successfully installing: https://pastebin.com/uUq916cm

@jimfangx jimfangx changed the title Windows - Fail to install robotjs Windows - Fail to install robotjs multiple errors: error MSB4019 & C2500 & C2600 type errors May 20, 2019
@jimfangx jimfangx changed the title Windows - Fail to install robotjs multiple errors: error MSB4019 & C2500 & C2600 type errors Windows - Fail to install robotjs multiple errors: MSB4019 & C2500 & C2600 May 20, 2019
@supunlakmal
Copy link

Hope this one also help to find the solution for install issue.

The code I run on terminal npm i robotjs --save

Error

> robotjs@0.5.1 install E:\xampp\htdocs\GitHub\electron-js-pc-idle-screen\node_modules\robotjs
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.8.0 runtime=node arch=x64 platform=win32)

E:\xampp\htdocs\GitHub\electron-js-pc-idle-screen\node_modules\robotjs>if not defined npm_config_node_gyp (node "C:\Users\Supun\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Supun\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\Supun\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Supun\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at C:\Users\Supun\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Supun\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd E:\xampp\htdocs\GitHub\electron-js-pc-idle-screen\node_modules\robotjs
gyp ERR! node -v v10.8.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! robotjs@0.5.1 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the robotjs@0.5.1 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\Supun\AppData\Roaming\npm-cache\_logs\2019-05-26T04_53_04_041Z-debug.log

@jphw
Copy link

jphw commented May 29, 2019

Same here.
Windows 7 + VS 2017

easy way to repro:

npm init
npm i robotjs --save

results in compilation error

> robotjs@0.5.1 install C:\Code\test\node_modules\robotjs
> prebuild-install || node-gyp rebuild


C:\Code\test\node_modules\robotjs>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) 
ВлѓЃЂ≠п•вбп ѓЃбЂ•§ЃҐ†в•Ђм≠†п б°Ѓа™† ѓаЃ•™вЃҐ Ґ нвЃђ а•и•≠®®. ЧвЃ°л Ґ™Ђоз®вм ѓ†а†ЂЂ•Ђм≠го б°Ѓа™г, §Ѓ°†Ґмв• ѓ†а†ђ•ва "/m".
  robotjs.cc
  win_delay_load_hook.cc
c:\code\test\node_modules\robotjs\src\os.h(26): warning C4005: STRICT: ®Іђ•≠•≠®• ђ†™аЃЃѓа•§•Ђ•≠®п (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc) [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\minwindef.h(23): note: бђ. ѓа•§л§гй•• Ѓѓа•§•Ђ•≠®• "STRICT" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(63): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(63): error C2789: "x": ва•°г•вбп ®≠®ж®†Ђ®І†ж®п Ѓ°к•™в† в®ѓ† ™Ђ†бб†, ™Ґ†Ђ®д®ж®аЃҐ†≠≠Ѓ£Ѓ ™†™ const [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\code\test\node_modules\robotjs\src\robotjs.cc(63): note:  бђ. Ѓ°к鹿•≠®• "x"
c:\code\test\node_modules\robotjs\src\robotjs.cc(64): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(64): error C2789: "y": ва•°г•вбп ®≠®ж®†Ђ®І†ж®п Ѓ°к•™в† в®ѓ† ™Ђ†бб†, ™Ґ†Ђ®д®ж®аЃҐ†≠≠Ѓ£Ѓ ™†™ const [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\code\test\node_modules\robotjs\src\robotjs.cc(64): note:  бђ. Ѓ°к鹿•≠®• "y"
c:\code\test\node_modules\robotjs\src\robotjs.cc(97): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(98): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(114): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(115): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(143): error C2661: v8::Value::ToString: ≠•в ѓ•а•£а㶕≠≠Ѓ© дг≠™ж®®, ѓа®≠®ђ†ой•© 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(143): error C2512: v8::String::Utf8Value::Utf8Value: ≠•в ѓЃ§еЃ§пй•£Ѓ ™Ѓ≠бваг™вЃа† ѓЃ гђЃЂз†≠®о [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(159): error C2661: v8::Value::BooleanValue: ≠•в ѓ•а•£а㶕≠≠Ѓ© дг≠™ж®®, ѓа®≠®ђ†ой•© 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(239): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(251): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(252): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(418): error C2039: Handle: ≠• 鹿п•вбп зЂ•≠Ѓђ "v8" [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8-platform.h(16): note:  бђ. Ѓ°к鹿•≠®• "v8"
c:\code\test\node_modules\robotjs\src\robotjs.cc(418): error C2065: Handle: ≠•Ѓ°к鹿•≠≠л© ®§•≠в®д®™†вЃа [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(418): error C2275: v8::Value: ≠•§Ѓѓгбв®ђЃ• ®бѓЃЂмІЃҐ†≠®• нвЃ£Ѓ в®ѓ† Ґ ™†з•б⥕ Ґла†¶•≠®п [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\code\test\node_modules\robotjs\src\robotjs.cc(418): note:  бђ. Ѓ°к鹿•≠®• "v8::Value"
c:\code\test\node_modules\robotjs\src\robotjs.cc(418): error C2065: value: ≠•Ѓ°к鹿•≠≠л© ®§•≠в®д®™†вЃа [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(418): error C2065: flags: ≠•Ѓ°к鹿•≠≠л© ®§•≠в®д®™†вЃа [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(418): error C2275: MMKeyFlags: ≠•§Ѓѓгбв®ђЃ• ®бѓЃЂмІЃҐ†≠®• нвЃ£Ѓ в®ѓ† Ґ ™†з•б⥕ Ґла†¶•≠®п [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\code\test\node_modules\robotjs\src\keypress.h(50): note:  бђ. Ѓ°к鹿•≠®• "MMKeyFlags"
c:\code\test\node_modules\robotjs\src\robotjs.cc(419): error C2448: GetFlagsFromString: Ґ•аЃпв≠Ѓ, ®≠®ж®†Ђ®І†вЃа, ®бѓЃЂмІгой®© бв®Ђм дг≠™ж®®, 鹿п•вбп Ѓѓа•§•Ђ•≠®•ђ дг≠™ж®® [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(424): error C2039: Handle: ≠• 鹿п•вбп зЂ•≠Ѓђ "v8" [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8-platform.h(16): note:  бђ. Ѓ°к鹿•≠®• "v8"
c:\code\test\node_modules\robotjs\src\robotjs.cc(424): error C2065: Handle: ≠•Ѓ°к鹿•≠≠л© ®§•≠в®д®™†вЃа [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(424): error C2275: v8::Value: ≠•§Ѓѓгбв®ђЃ• ®бѓЃЂмІЃҐ†≠®• нвЃ£Ѓ в®ѓ† Ґ ™†з•б⥕ Ґла†¶•≠®п [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\code\test\node_modules\robotjs\src\robotjs.cc(424): note:  бђ. Ѓ°к鹿•≠®• "v8::Value"
c:\code\test\node_modules\robotjs\src\robotjs.cc(424): error C2065: value: ≠•Ѓ°к鹿•≠≠л© ®§•≠в®д®™†вЃа [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(424): error C2065: flags: ≠•Ѓ°к鹿•≠≠л© ®§•≠в®д®™†вЃа [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(424): error C2275: MMKeyFlags: ≠•§Ѓѓгбв®ђЃ• ®бѓЃЂмІЃҐ†≠®• нвЃ£Ѓ в®ѓ† Ґ ™†з•б⥕ Ґла†¶•≠®п [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\code\test\node_modules\robotjs\src\keypress.h(50): note:  бђ. Ѓ°к鹿•≠®• "MMKeyFlags"
c:\code\test\node_modules\robotjs\src\robotjs.cc(425): error C2448: GetFlagsFromValue: Ґ•аЃпв≠Ѓ, ®≠®ж®†Ђ®І†вЃа, ®бѓЃЂмІгой®© бв®Ђм дг≠™ж®®, 鹿п•вбп Ѓѓа•§•Ђ•≠®•ђ дг≠™ж®® [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(457): error C2661: v8::Value::ToString: ≠•в ѓ•а•£а㶕≠≠Ѓ© дг≠™ж®®, ѓа®≠®ђ†ой•© 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(457): error C2512: v8::String::Utf8Value::Utf8Value: ≠•в ѓЃ§еЃ§пй•£Ѓ ™Ѓ≠бваг™вЃа† ѓЃ гђЃЂз†≠®о [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(463): error C2064: а•ІгЂмв†вЃђ Ґлз®бЂ•≠®п да†£ђ•≠в† ≠• 鹿п•вбп дг≠™ж®п, ѓа®≠®ђ†ой†п 2 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(515): error C2064: а•ІгЂмв†вЃђ Ґлз®бЂ•≠®п да†£ђ•≠в† ≠• 鹿п•вбп дг≠™ж®п, ѓа®≠®ђ†ой†п 2 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\code\test\node_modules\robotjs\src\robotjs.cc(589): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(603): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(639): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(640): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(708): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(709): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(710): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(711): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(768): error C2660: v8::Value::Uint32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2567): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Uint32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(769): error C2660: v8::Value::Uint32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2567): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Uint32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(770): error C2660: v8::Value::Uint32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2567): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Uint32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(771): error C2660: v8::Value::Uint32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2567): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Uint32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(772): error C2660: v8::Value::Uint32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2567): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Uint32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(774): warning C4996: 'v8::Object::Get': Ѓ°к鹿•≠ deprecate [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(3412): note:  бђ. Ѓ°к鹿•≠®• "v8::Object::Get"
c:\code\test\node_modules\robotjs\src\robotjs.cc(788): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)
c:\code\test\node_modules\robotjs\src\robotjs.cc(789): error C2660: v8::Value::Int32Value: дг≠™ж®п ≠• ѓа®≠®ђ†•в 0 †а£гђ•≠вЃҐ [C:\Code\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\fedor\.node-gyp\12.3.1\include\node\v8.h(2569): note:  бђ. Ѓ°к鹿•≠®• "v8::Value::Int32Value" (™Ѓђѓ®Ђ®аг•вбп ®беЃ§≠л© д†©Ђ ..\src\robotjs.cc)

@Joey-Deakin
Copy link

Same here, really need help.

`PS C:\github\stopwatch> npm install robotjs

robotjs@0.5.1 install C:\github\stopwatch\node_modules\robotjs
prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.1.0 runtime=node arch=x64 platform=win32)

C:\github\stopwatch\node_modules\robotjs>if not defined npm_config_node_gyp (node "C:\Users\jdong\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\jdong\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\github\stopwatch\node_modules\robotjs\build\robotjs.vcxproj(20,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\jdong\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\jdong\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\github\stopwatch\node_modules\robotjs
gyp ERR! node -v v10.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! robotjs@0.5.1 install: prebuild-install || node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the robotjs@0.5.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
`

@jimfangx
Copy link
Author

jimfangx commented May 31, 2019

@jphw What version of node are you running? It seems like we have exact errors.
I got mine to work. I had node v12.3.1, turns out that robotjs uses deprecated functions that got removed in v12. So that is the cause of all the C-series errors. I downgraded mine to v11.15.0 and the installation worked. I got it from this issue: #475.

Also I am running windows-build-tools 4.0.0 instead of 5.1.0 since the 5.1.0 installer freezes when installing python.
It would also be a good idea to follow all the instructions here in the readme for building. Last command node-gyp rebuild did not work for me, but nonetheless, the robot was installed, and that is what matters! :)

Hope this helps. Let me know if you have any questions!

Joey-Deakin & supunlakmal Let me know if my solution works for you guys too! :)

@AaronClaros
Copy link

AaronClaros commented May 31, 2019

It seems that this problem is caused by the node version you have and the latest build of robotjs

TL:DR

install node v8.x

Context

I don't know much about node js, so i will be wrong on almost all my explanation, so take it with care.

At first i had an error related with node-gyp, i update my node js version from 8.9.4 to 10.15.2 but doesn't works, then i find the fix here: node-gyp issue 1463
After this, i had the same exact error that has OP, i try to fix following this fix but it doesn't work at all and after a quick research i learn this.
There is a property on node js (process.versions.modules),
it seems that versions.modules value is relevant to get the correct pre-compiled build. I made suppositions from this: Robot/robot-js#42 (this threat is from robot-js don't not confuse with robotjs)

//process_info.js
var arch = process.arch;
var platform = process.platform;
var modules = process.versions.modules;
var version = process.version
var info = "node " + version + " process info: " +
    "arch(" + arch + ")-" +
    "platform(" + platform   + ")-" +
    "modules version("+ modules + ")";
console.log(info);

when run, i get this:
node v10.15.2 process info: arch(x64)-platform(linux)-modules version(64)

the pre-compiled builds of robotjs has the following format:
robotjs-[version]-node-v[modules]-[platform]-[arch].tar.gz
Robotjs Releases
the current robotjs version (0.5.1) has pre compiled builds for just a few modules version

knowing this, i downgrade my node installation to v9.2.0 just to try.
and run the process_info.js script, and i get this.
node v9.2.0 process info: arch(x64)-platform(linux)-modules version(59)
the i look into Robotjs Releases to see if there is a build for this modules version, but there isn't.
so i downgrade again, but now with the version that i have at the begin, 8.9.4
and then:
node v8.9.4 process info: arch(x64)-platform(win32)-modules version(57)
again i review the robotjs releases and find this: robotjs-v0.5.1-node-v57-win32-ia32.tar.gz

so i try to install robotjs again and it works.
this is how i loss a day of work by updating nodejs when there is no need, see ya.

@malhotra-sidharth
Copy link
Contributor

malhotra-sidharth commented Jun 7, 2019

I have updated all the deprecated functions for v8 which allows to use it with Nodejs 12.x.x There are still some deprecation warnings but library compiles well and works fine. I have submitted a pull request. In the meantime you can point your package.json to master branch of my fork sidharth0094/robotjs. I am running nodejs v12.3.1 Hope this helps. :)

@matdombrock
Copy link

Have the same exact issue it seems.

NODE: v12.4.0
NPM: 6.9.0

PS C:\Users\Mathieu\Documents\LAB\electron\test> npm install robotjs

> robotjs@0.5.1 install C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.4.0 runtime=node arch=x64 platform=win32)

C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  robotjs.cc
  win_delay_load_hook.cc
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\os.h(26): warning C4005: 'STRICT': macro redefini
tion (compiling source file ..\src\robotjs.cc) [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build
\robotjs.vcxproj]
  c:\program files (x86)\windows kits\10\include\10.0.17763.0\shared\minwindef.h(23): note: see previous definition of
  'STRICT' (compiling source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(63): error C2660: 'v8::Value::Int32Val
ue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotj
s.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(63): error C2789: 'x': an object of co
nst-qualified type must be initialized [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs
.vcxproj]
  c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(63): note: see declaration of 'x'
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(64): error C2660: 'v8::Value::Int32Val
ue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotj
s.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(64): error C2789: 'y': an object of co
nst-qualified type must be initialized [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs
.vcxproj]
  c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(64): note: see declaration of 'y'
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(97): error C2660: 'v8::Value::Int32Val
ue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotj
s.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(98): error C2660: 'v8::Value::Int32Val
ue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotj
s.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(114): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(115): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(143): error C2661: 'v8::Value::ToStrin
g': no overloaded function takes 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\r
obotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(143): error C2512: 'v8::String::Utf8Va
lue::Utf8Value': no appropriate default constructor available [C:\Users\Mathieu\Documents\LAB\electron\test\node_module
s\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(159): error C2661: 'v8::Value::Boolean
Value': no overloaded function takes 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\bui
ld\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(239): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(251): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(252): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(418): error C2039: 'Handle': is not a
member of 'v8' [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8-platform.h(16): note: see declaration of 'v8'
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(418): error C2065: 'Handle': undeclare
d identifier [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(418): error C2275: 'v8::Value': illega
l use of this type as an expression [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vc
xproj]
  c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(418): note: see declaration of 'v8::
  Value'
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(418): error C2065: 'value': undeclared
 identifier [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(418): error C2065: 'flags': undeclared
 identifier [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(418): error C2275: 'MMKeyFlags': illeg
al use of this type as an expression [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.v
cxproj]
  c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\keypress.h(50): note: see declaration of 'MMKey
  Flags'
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(419): error C2448: 'GetFlagsFromString
': function-style initializer appears to be a function definition [C:\Users\Mathieu\Documents\LAB\electron\test\node_mo
dules\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(424): error C2039: 'Handle': is not a
member of 'v8' [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8-platform.h(16): note: see declaration of 'v8'
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(424): error C2065: 'Handle': undeclare
d identifier [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(424): error C2275: 'v8::Value': illega
l use of this type as an expression [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vc
xproj]
  c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(424): note: see declaration of 'v8::
  Value'
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(424): error C2065: 'value': undeclared
 identifier [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(424): error C2065: 'flags': undeclared
 identifier [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(424): error C2275: 'MMKeyFlags': illeg
al use of this type as an expression [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.v
cxproj]
  c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\keypress.h(50): note: see declaration of 'MMKey
  Flags'
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(425): error C2448: 'GetFlagsFromValue'
: function-style initializer appears to be a function definition [C:\Users\Mathieu\Documents\LAB\electron\test\node_mod
ules\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(457): error C2661: 'v8::Value::ToStrin
g': no overloaded function takes 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\r
obotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(457): error C2512: 'v8::String::Utf8Va
lue::Utf8Value': no appropriate default constructor available [C:\Users\Mathieu\Documents\LAB\electron\test\node_module
s\robotjs\build\robotjs.vcxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(463): error C2064: term does not evalu
ate to a function taking 2 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.v
cxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(515): error C2064: term does not evalu
ate to a function taking 2 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.v
cxproj]
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(589): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(603): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(639): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(640): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(708): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(709): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(710): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(711): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(768): error C2660: 'v8::Value::Uint32V
alue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robo
tjs.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2567): note: see declaration of 'v8::Value::Uint32Value' (compili
  ng source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(769): error C2660: 'v8::Value::Uint32V
alue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robo
tjs.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2567): note: see declaration of 'v8::Value::Uint32Value' (compili
  ng source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(770): error C2660: 'v8::Value::Uint32V
alue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robo
tjs.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2567): note: see declaration of 'v8::Value::Uint32Value' (compili
  ng source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(771): error C2660: 'v8::Value::Uint32V
alue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robo
tjs.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2567): note: see declaration of 'v8::Value::Uint32Value' (compili
  ng source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(772): error C2660: 'v8::Value::Uint32V
alue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robo
tjs.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2567): note: see declaration of 'v8::Value::Uint32Value' (compili
  ng source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(774): warning C4996: 'v8::Object::Get'
: was declared deprecated [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robotjs.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(3412): note: see declaration of 'v8::Object::Get'
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(788): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
c:\users\mathieu\documents\lab\electron\test\node_modules\robotjs\src\robotjs.cc(789): error C2660: 'v8::Value::Int32Va
lue': function does not take 0 arguments [C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs\build\robot
js.vcxproj]
  c:\users\mathieu\.node-gyp\12.4.0\include\node\v8.h(2569): note: see declaration of 'v8::Value::Int32Value' (compilin
  g source file ..\src\robotjs.cc)
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:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272: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" "rebuild"
gyp ERR! cwd C:\Users\Mathieu\Documents\LAB\electron\test\node_modules\robotjs
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! robotjs@0.5.1 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the robotjs@0.5.1 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\Mathieu\AppData\Roaming\npm-cache\_logs\2019-06-10T11_41_54_220Z-debug.log

@jimfangx
Copy link
Author

I got mine to work. I am using it w/ electron. I downgraded to 11.15.0, then rebuilt all my dependencies on 11.15.0. Took awhile, but eventually it worked. I rebuilded robotjs using npm rebuild --runtime=electron --target=4.2.0 --disturl=https://atom.io/download/atom-shell --abi=69. I also moved back to electron 4.2.0 from v5 since v5 requires node v12. Then rebuilt robotjs w/ NODE_MODULE_VERSION 69 (which is what electron 4.2.0 was on).
Hope this helps - especially if you are using robot w/ electron.

@xhacker5000
Copy link

折磨老子一个晚上,妈逼的
用中文写上解决方案,不给老外们读懂的机会。
告诉大家,这个逼库贼恶心,用npm rebiuld根本别想指定ABI

我各种对比打印electron各个版本使用的node版本,终于搞定

方法是用cnpm来去rebiuld

在package.json里加入
"rebuild": "npm rebuild robotjs --runtime=electron --target=4.2.4 --disturl=https://atom.io/download/atom-shell --abi=69"

然后不要运行npm run rebiuld
要运行cnpm run rebiuld
然后你就发现这个robotjs各种咔咔一顿编译.cc
然后成功。。

@ASnow
Copy link

ASnow commented Aug 24, 2019

It was no realy clear where I must get proper compiling versions for me. This should help for others:

cmd> electron -a && electron -v
57         # <= this is --abi
v1.8.4     # <= this is --target

After this you run in project:

npm rebuild --runtime=electron --target=1.8.4 --disturl=https://atom.io/download/atom-shell --abi=57

@camhart
Copy link

camhart commented Oct 29, 2019

Ran into the same issue. Using NVM I was able to install node 8.10 and get it working without having to uninstall node 12.

https://github.com/coreybutler/nvm-windows

@oktapodia
Copy link
Collaborator

A new version of robotjs supporting the latest NodeJS version will be published soon.

@oktapodia oktapodia added this to the v0.6.0 milestone Nov 24, 2019
@chungheek
Copy link

A new version of robotjs supporting the latest NodeJS version will be published soon.

@oktapodia Do you know when it is expected to be published?

@oktapodia
Copy link
Collaborator

The new robotjs version has been published but there is a bug into the NodeJS core about the screen sizing, it should be packaged soon into a new NodeJS version libuv/libuv#2566

@liketurbo
Copy link

  1. Please use nvm and switch to the version node@8
  2. Complete installation of all prerequisites from node-gyp

@lucasguaru
Copy link

I had to install npm install --global windows-build-tools as admin.
After that, it was possible to install.
My node version is v12.16.1

@footmess
Copy link

It seems to be the reason of node-gyp. When executing node-gyp rebuild, the version of node-gyp used is the version that npm depends on (default is 3.8.0). You can modify the version of node-gyp through
npm config set node-gyp /path/

@footmess
Copy link

Modifying the node-gyp in npm directly seems not to work . There is a npm-lifecycle package in npm, and the version 3.8.0 is executed inside.

@jimfangx jimfangx closed this as completed May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests