Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在角度电子应用程序中使用robotjs进行远程控制,它在开发模式下加载正常(npm run electron)但是当我使用电子打包器打包(.exe)然后在生成exe文件后我得到“找不到模块robotjs”运行exe文件。
软件细节。
电子 - v7.1.1 节点 - v10.16.3 win - win 10 64bit
我遵循了robotjs.io 并遵循了所有先决条件,没有帮助。
我能够想办法摆脱这个问题,不确定它是否正确。
1)电子包装器。--win32 --overwrite --prune --app-version=0.0.1 --asar --icon=./src/assets/icons/images/Mavenir_blue.ico --ignore=/src --ignore=/node_module
删除 --ignore/node_module
2)编译时将robotjs模块移出节点模块。