First of all, you find the install path of your Electron app. If you found it, find the resources folder. If you found it, you'll have to install asar globally, by running:
npm install -g @electron/asar
Then, you can decompile the app by running:
asar extract app.asar app
It is recommended to copy the app.asar file to your user/home directory to not get tired of it having to ask you for permissions. (if it's stored in the root directory, this is for Linux users only.)
cd into the app source:
cd app
Electron isn't installed by default. You can install it by running:
npm install --save-dev electron
You may run the app in development mode by running:
npx electron .
Or, you may add a start script in the package.json file:
{
...
"devDependencies": {
"electron": "^22.0.0"
},
"scripts": {
"start": "electron ."
}
...
}
and run npm run start
to run the app.
If you'd want to compile, you can install electron-builder:
npm install --save-dev electron-builder
Then, you can run:
npx electron-builder
This will compile for the current OS you're running. You can also specify the OS and architecture:
npx electron-builder --platform=darwin --arch=x64
like that.