Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A JavaScript error occurred in the main process #8155

Open
DESsmily opened this issue Mar 26, 2024 · 1 comment
Open

A JavaScript error occurred in the main process #8155

DESsmily opened this issue Mar 26, 2024 · 1 comment

Comments

@DESsmily
Copy link

  • Electron-Builder Version: 24.13.3
  • Node Version: 16.18.1
  • Electron Version: 29.1.5
  • Electron Type (current, beta, nightly):
  • Target: windows x64
  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
Copy link

koking0 commented Apr 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants