dev 环境中,使用了 electron-rebuild进行重新编译,以匹配electron的版本和内置node版本。Dev环境一切运行正常。
但是在使用electron-builder打包成dmg安装包之后,node与electron版本不一致的问题还是出现了。说明,在build的过程中,并没有重新rebuild robotjs。
试过:
"rebuild": "electron-rebuild -f -w robotjs",
"rebuild": "npm rebuild --runtime=electron --target=13.1.9 --disturl=https://atom.io/download/atom-shell --abi=83"
如何正确设置electron build, 才能在打包时正确rebuild robotjs?
cannot find module robotjs?