Open SKeeble89 opened 3 years ago
+1
+1
I solved in this way:
Require this after requiring robotjs
require("./node_modules/robotjs/build/Release/robotjs.node")
I hope I have been helpful
@VitoFarella thank you so much! This worked perfectly :-)
Expected Behavior
running pkg . should create an. exe of node/express application. ## Current BehaviorPkg . creates faulty .exe, debug shows the following error with robotjs
[debug] prebuild-install failed[C:\Users\Documents\node_modules\robotjs\build\Release\robotjs.node ]: Error: spawnSync C:\npm\node_modules\pkg\node_modules.bin\prebuild-install ENOENT
Possible Solution
Steps to Reproduce (for bugs)
1.create a nodejs/express server app with an end point. 2.add robot js typeString("helloworld") and keyTap(Enter) 3.setup assets for pkg in package.json as error this stackoverflow question. 4.run pkg . --debug to see the build, create .exe and run in terminal to see call error on robotjs
Context
I want to create an. exe file of the project I have built.
I have created an express server that I can run pkg . on and create a stable .exe for my application. As soon as I introduce my call to robot js, I can run my application via the terminal using 'npm start' script with the exact behaviour that I expect from robotjs, but if I run pkg . with the calls to robotjs included the .exe fails to run with the errors shown above and in the stackoverflow question link.
Your Environment