I'm trying to use Typescript together with Electron and RobotJS. I'm a beginner with all of these technologies so I lack the deep understanding of what is happening behind the scenes so I cannot really connect the dots on this issue. Electron and my app are working fine, everything compiles, but RobotJS won't work. The error I get is the following:
ERROR in ./node_modules/robotjs/build/Release/robotjs.node 1:0
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
I tried rebuilding RobotJS for Electron but it still doesn't work. Is this a native node module? I'm not sure, gotta read up on it first to figure out what I have to do with it if it indeed is.
Is this even achievable? Thanks and have a lovely day!
LE: It would appear that I was trying to use robotjs that relies on node (main process) from angular (rendered process). When I moved what I was trying to do with robotjs from the angular component to main.ts that is ran by electron, it worked. I will try and find a way to use it from angular, I guess Inter-process Communication or something, since I couldn't find any other way for now. Still waiting for ideas since I'm kind of in the dark right now. Thanks!