且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在打包的Electron应用程序中运行execFileSync时出错

更新时间:2022-04-21 03:47:41

我认为打包后路径可能是错误的。您应该尝试在应用中执行 console.log(app.getAppPath()); (例如,发送至渲染器,写入日志文件等),以进行仔细检查。如果它指向预期的路径。

I think the path could be wrong after packaging. You should try to do a console.log(app.getAppPath()); (e.g. send to renderer, write to a log file etc.) in your app to double check if it is pointing to the expected path.