Closed amunim closed 3 years ago
Please provide
The command I typed was npm i robotjs
I also met the same problem. How did I solve it?
@deepinsea I don't know how you solved it but I have updated the issue description. It has 'current workaround' which you can follow.
Python 2.7 and virtual studio 2017 are configured,
The "node gyp configure" and "node gyp builld" commands still fail,
For this reason, I reduce the version node@14.15.2 , python 3.7 to 8.9.4 and python 2.7, Recently It seems that python2.7 support has been removed, but "NPM install -- global -- production windows build tools" still indicates that python3.7 is not available,
for this,It's very frustrating
I may need to spend a lot of time to solve this bug, rather than simply use it immediately
@amunim Does the latest version support python3.7 instead of python2.7? Can you give me a list of configurations that work well? For example: node: 14.15.2 python: 3.7 virtual studio: 2017 ......
See octalmage/robotjs#651
@amunim Does the latest version support python3.7 instead of python2.7? Can you give me a list of configurations that work well? For example: node: 14.15.2 python: 3.7 virtual studio: 2017 ......
My current build in which the workaround worked is: node: v15 python: 3.8 vstools: 2017
gyp info find VS using VS2017 (15.9.28307.1401) found at: //location
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp info find Python using Python version 3.8.8 found at //location
gyp info using node-gyp@7.1.2
gyp info using node@15.10.0 | win32 | ia32
it doesn't work if I try to install it directly to my project. It would be helpful, if you could actually read and try the way which worked for me and then post a reply :)
It would be helpful if you could make robotjs automated tests on AppVeyor fail so that we can all see the problem. This would be especially helpful for folks like me who do not have a Windows box.
also meet the same problem on MacOS 15, Node 12, Python 3.8
Then why is it so difficult to create the requested failing test?
Then why is it so difficult to create the requested failing test?
after removing .node-gyp cache, this issue magically disappear, I think it may be difficult to reproduce this issue in a clean environment.
This should be closed.
how can i remove .node-gyp cache?
I'm trying to install robotjs and its been 2 days without any luck, constantly getting this error. I have even copy pasted nan module in node-gyp node_modules and robotjs node_modules and it is still not installing nor rebuilding
``` gyp: Call to 'node -e "require('nan')"' returned exit status 0 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Windows_NT 10.0.18363 ```my package.json
``` { "name": "MY SECRET PROJECT NAME", "version": "1.0.0", "description": "", "main": "main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "electron ." }, "author": "", "license": "ISC", "dependencies": { "electron-prompt": "^1.6.1", "electron-store": "^7.0.2", "iohook": "^0.7.2", "puppeteer": "^7.1.0", "robotjs": "^0.6.0" }, "devDependencies": { "electron": "^11.3.0" }, "iohook": { "targets": [ "node-88", "electron-85" ], "platforms": [ "win32" ], "arches": [ "x64", "ia32" ] } } ```Current Workaround:
Make a new project with
npm init
then runnpm i robotjs
, you can also use .npmrc to download directly for electron like this:after downloading and on a new project robotjs will install successfully now copy everything inside your new project's
node_modules
folder and paste it in the project'snode_modules
in which it is not working. Lastly addrobotjs: 0.6.0
or the version you downloaded to the project'spackage.json
Culprit: npm
Reasoning:
npm was removing packages when running
npm install
command so I think removed modules were required byrobotjs
, now I had to manually add them innode_modules
folder.NOTE: You have to do this every time if you can't run
npm i robotjs
,npm rebuild
.