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

Error occurs when using electron rebuilt with "electron-rebuild" #3818

Open
3 tasks done
neolord0 opened this issue Jan 24, 2025 · 0 comments
Open
3 tasks done

Error occurs when using electron rebuilt with "electron-rebuild" #3818

neolord0 opened this issue Jan 24, 2025 · 0 comments

Comments

@neolord0
Copy link

neolord0 commented Jan 24, 2025

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

7.6.0

Electron version

30.5.1

Operating system

macOS 15,2

Last known working Electron Forge version

No response

Expected behavior

I wanted to run a java program from a packaged electron app.

Actual behavior

The packaged electron app runs, but the java module does not work.

Steps to reproduce

Hello.
I'm trying to use Java with electron.

So, I installed it on my macOS like this:

nvm use 20.18.2

npm install --save java
npm install --save-dev electron@30.5.1

And, I rebuilt electron to connect the two:

npm install --save-dev @electron/rebuild

package.json
  "scripts": {
    "start": "electron .",
    "rebuild": "electron-rebuild -f -w java",
  }

npm run rebuild
node node_modules/java/postInstall.js

After that, when I test the program, it works fine:

npm run start

Finally, to package it, I followed guide to install and run electron-forge.

The packaging process completed successfully, and the program runs, but the program terminates at the point where the JAVA module is executed. I think it's because the packaged electron is linked to java and not rebuilt. What should I do? I need help.

Additional information

No response

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

1 participant