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

Simple example for compilation and execution with Electron #248

Open
SimoneMSR opened this issue Dec 11, 2024 · 0 comments
Open

Simple example for compilation and execution with Electron #248

SimoneMSR opened this issue Dec 11, 2024 · 0 comments

Comments

@SimoneMSR
Copy link

SimoneMSR commented Dec 11, 2024

I am trying to execute an electron app using my code in myapp.js , which contains something like this

const  {electron } = require("electron");
const app=electron.app
...
const BrowserWindow = electron.BrowserWindow;
....
mainWindow = new BrowserWindow(electronOptions);
.....
mainWindow.loadURL(`${prefix}${address}:${port}`);

While a node server is already running in localhost on the specified port.

I successfully compile myapp.js with this command:
bytenode compile -e myapp.js

but when I run with:
bytenode myapp.jsc
I get this error
throw new Error('Invalid or incompatible cached data (cachedDataRejected)')

and this is true alsfo if I specify the path to global electron .exe .
Following issue 187, I ensure that the local and global versions of electron are the same

How should I compile for electron? How can I execute the electron app?

Here my system info:

bytenode 1.5.6
Node 20.13.1
electron: 31.7.4
Platform: Windows 10

Thank you

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