错误:ENOENT,找不到dist / electron / ubuntu_connection.json

时间:2019-11-09 13:45:16

标签: javascript node.js electron electron-builder

我有电子应用程序,想从中建立执行文件(deb-exe等)。我的操作系统也是ubuntu 18:04。

版本:

node= 10.15.3
npm= 6.4.1
yarn= 1.19.1
electron= 6.1.4
electron-builder= 20.19.2

以及运行my-app.AppImage时出现的错误:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: ENOENT, dist/electron/ubuntu_connection.json not found in /tmp/.mount_cims-aXC2Hq7/resources/app.asar
    at createError (electron/js2c/asar.js:109:17)
    at Object.fs.readFileSync (electron/js2c/asar.js:586:24)
    at Module.<anonymous> (/tmp/.mount_cims-aXC2Hq7/resources/app.asar/dist/electron/main.js:1:107260)
    at t (/tmp/.mount_cims-aXC2Hq7/resources/app.asar/dist/electron/main.js:1:115)
    at /tmp/.mount_cims-aXC2Hq7/resources/app.asar/dist/electron/main.js:1:923
    at Object.<anonymous> (/tmp/.mount_cims-aXC2Hq7/resources/app.asar/dist/electron/main.js:1:933)
    at Module._compile (internal/modules/cjs/loader.js:786:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)

我该怎么办?

0 个答案:

没有答案