electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.47k stars 1.72k forks source link

A JavaScript error occurred in the main process #8155

Open DESsmily opened 3 months ago

DESsmily commented 3 months ago
  A JavaScript error occurred in the main process
  Uncaught Exception:
  Error: ENOTDIR, not a directory
         at createError (node:electron/js2c/nodeinit:2:1750)
         at t.mkdirSync (node:electron/js2c/node _init:2:12896)
         at  exports.initFileConf
  (D:\software\localServer\resources\app.asar\bin\initCOnf.js:10:12)
         at Object.<anonymous> 
  (D:\software\localServer\resources\app.asar\scripts\ipcHandler.js:27:1)
         at Module._compile (node:internal/modules/cjs/loader:1256:14)
         at Module._extensions.js (node:internal/modules/cjs/loader:1311:10)
         at Module.load (node:internal/modules/cjs/loader:1098:32)
         at Module. load (node:internal/modules/cjs/loader:945:12)
         at c. load   (node:electron/js2c/node_init:2:13672)
         at Module.require (node:internal/modules/cjs/loader:1122:19)

使用 electron . 可正常运行项目,但是通过electron-builder 打包后就出现了这个问题 我在main.js中引入了一个执行创建目录的函数 image

image

koking0 commented 2 months ago

我也遇到了这个问题,请问解决了么?

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.