找不到模块robotjs

问题描述 投票:0回答:1

[我正在使用robotjs在角电子应用程序中进行远程控制,它在开发模式下正常运行(npm运行电子),但是当我使用电子打包程序打包(.exe)时,在生成exe文件后,我得到“找不到模块robotjs “在运行exe文件时。

S / W详细信息。

电子-v7.1.1节点-v10.16.3赢-赢10 64位

我遵循robotjs.io并遵循所有先决条件,没有帮助。

enter image description here

angular windows electron packaging robotjs
1个回答
0
投票
我想出办法解决此问题,不确定是否采用正确的方法。

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)编译时将robotsjs模块移出节点模块。
© www.soinside.com 2019 - 2024. All rights reserved.