0

I am using robotjs for remote control in angular electron app, it loads up fine in development mode(npm run electron) but when I do packaging (.exe) using electron packager then after generating exe file I get "Cannot find module robotjs" upon running the exe file.

S/W details.

electron - v7.1.1
node - v10.16.3
win - win 10 64bit

I have followed robotjs.io and followed all the pre-requisites, no help.

enter image description here

Shoib Mohammed A
  • 298
  • 4
  • 12

1 Answers1

0

I was able to figure out to get away with this problem not sure whether its right approach or not.

1) electron-packager . --win32 --overwrite --prune --app-version=0.0.1 --asar --icon=./src/assets/icons/images/Mavenir_blue.ico --ignore=/src --ignore=/node_module

remove --ignore/node_module

2) Move robotjs module out of the node module while compiling.

Shoib Mohammed A
  • 298
  • 4
  • 12