-
Notifications
You must be signed in to change notification settings - Fork 964
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
Comments
Hope this one also help to find the solution for install issue. The code I run on terminal Error
|
Same here. easy way to repro:
results in compilation error
|
Same here, really need help. `PS C:\github\stopwatch> npm install robotjs
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 ) npm ERR! code ELIFECYCLE |
@jphw What version of node are you running? It seems like we have exact errors. 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. 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! :) |
It seems that this problem is caused by the node version you have and the latest build of robotjs TL:DRinstall node v8.x ContextI 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 //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: the pre-compiled builds of robotjs has the following format: knowing this, i downgrade my node installation to v9.2.0 just to try. so i try to install robotjs again and it works. |
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 |
Have the same exact issue it seems. NODE: v12.4.0
|
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 |
折磨老子一个晚上,妈逼的 我各种对比打印electron各个版本使用的node版本,终于搞定 方法是用cnpm来去rebiuld 在package.json里加入 然后不要运行npm run rebiuld |
It was no realy clear where I must get proper compiling versions for me. This should help for others:
After this you run in project:
|
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. |
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? |
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 |
|
I had to install |
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 |
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. |
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: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)
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
npm i robotjs
(0.5.1)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
The text was updated successfully, but these errors were encountered: