-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ERR_ELECTRON_BUILDER_CANNOT_EXECUTE #5134
Comments
Have the same issue here, I need to downgrade to 21.2.0 |
even with electron-builder version = 21.2.0 the problem persists Error: C:\Users\M******_C******\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.3.2\Bin\makensis.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE |
I had the same issue, I moved my app folder to the root of my hard-drive, and it worked. Electron-builder does not seem to be supporting non-ASCII characters in the path of an app. |
unfortunately the problem still persists. |
@Eole7 Care to elaborate your solution? I am running into the same issue, not very helpful for my CI. |
Well, if you're running the same issue on your CI, my solution might not help you, as I don't have this issue on my CI. Though, the issue I have on local is that when I add the LICENSE key (but from what I've read on other issues, it could be for other reasons) to my NSIS build parameters and that the path of my app contains non-ASCII characters, I get the above error. I moved my app folder to the root directory of my drive and the build was successful. |
I had the same problem but only when trying to brand our product with The solution that we ended up needing is install node: v10.15.3 we simple added these commands to our Dockerfile:
The part about needing the wine framework is also detailed in the official docs |
This error may also appear when you're trying to build the app while some electron process is running (e.g. after improperly closing the dev server). Open your task manager and make sure you don't have any running electron processes. |
Same here. Above comments are looking not related to my case. I don't know what is wrong. |
Solved:
|
Under Linux it cannot be even jpg as i did for windows. It has to be png. |
same here, issue was missing |
Yeah, if you look further down the output there should be a more descriptive error. Mine was
I was able to fix it by opening the image in GIMP and re-saving it. |
Same for me, wrong icon path. Got to say electron-builder error reporting is quite awful. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Still relevant. A missing icon shouldn't produce an unrelated "ERR_ELECTRON_BUILDER_CANNOT_EXECUTE" which is impossible to debug. |
On GitHub actions I am getting the following error: electron-builder install-app-deps
• electron-builder version=22.9.1
• loaded configuration file=package.json ("build" field)
⨯ node_modules.Dependency.Dependencies: ReadMapCB: expect { or n, but found [, error found in #10 byte of ...|ncies" : [],
"main|..., bigger context ...|/garycourt/JSV.git"
}
],
"dependencies" : [],
"main" : "lib/jsv.js",
"keywords" : ["json"|...
Error reading package.json: /home/runner/work/arc-electron/arc-electron/node_modules/JSV/package.json
⨯ /home/runner/work/arc-electron/arc-electron/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=
Error: /home/runner/work/arc-electron/arc-electron/node_modules/app-builder-bin/linux/x64/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/home/runner/work/arc-electron/arc-electron/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) It looks like a file is not being properly read? Not sure why this error is thrown. |
getting the same error, no clue what the cause is |
@jarrodek please open a separate issue, EB error reporting is certainly bad and your error code is indeed the same, but the issues should probably be triaged separately. @FrancescoBorzi not sure which error you're referring to. Is it related to icons? GitHub actions? Please elaborate when you have a chance 🙂 |
I'm getting the same error as the title of this issue report My app is: https://github.com/azerothcore/Keira3 reproduction steps: clone the repo, Do I need to open a separate issue for that? |
I ran into this error as well. Turned out that it didn't like that I had nvm installed (which had somehow caused a weird state where my global npm was missing and I'd needed to install it with yarn). Removing nvm and reinstalling node fixed it for me. |
For me the issue was the high resolution of the icns file for the mac icon (1024x1024), and not having specified an icon for the linux build. For the linux version I added a 512x512.png and added it to the linux config, that solved the issue for me. |
I had this trouble today.
After some tries, I've got the fact I was using the global npm's electron-builder, so I changed the command like below :
It works fine now anyway. |
I was having the same problem. |
For me |
If you run |
recommended here: electron-userland/electron-builder#5134 (comment)
Solved for me, the issue was that I had a process still using something in the /dist folder. I closed everything and then deleted the dist directory. Running the command again worked first time. |
I for myself had this issue when using the {
"build": {
"appId": "com.electron.${name}"
}
} As it looks like the issue can be caused by a multitude of different configurations, this possibly is not working for anyone of you. Just wanted to leave my solution out there in case someone also uses a variable inside his |
I'm getting the same error suddenly. Possibly after upgrading MacOS to 12.5 (Monterey). node 16.14 I've tried agreeing to the xcode license as suggested on #4802 and #4629 I tried clearing the nsis cache in I tried clearing my /dist folder as suggested above. But I still get the following error. Any new ideas?
|
I know it sounds dumb, but did you try deleting the dist folder entirely? I get this error every time the dist folder isn't deleted. I'm also building on windows so I'm not sure if this will help you. |
I started having this issue upgrading from yarn 1 to yarn 3, however, the exception I'm getting is very generic making it very difficult to understand what exactly is going wrong. Log from my CI
|
@PerfectionVR can you try running with DEBUG=electron-builder env var? That'll hopefully show what the cmd being executed is so you can try running it via cmd line separately |
|
It appears that electron-builder only supports yarn 1 as it is now. But you can't use both yarn 1 and yarn 2 in one project like this... |
Yarn 2 is supported from what I understand, just monorepos don't work IIRC? It's been a hot minute since I worked in this category, but here's the code that checks for yarn 2 electron-builder/packages/app-builder-lib/src/util/yarn.ts Lines 77 to 84 in d835aba
|
In my case: docker witch node, java, angular and electron this works - I left full dockerfile
|
The challenge/issue here is that the electron-builder has some functionality for which we use the dual package.json method. However, as soon as you use this method, yarn stumbles and can cause this error. I suspect others are also using a dual package.json method. Refer: https://www.electron.build/tutorials/two-package-structure |
Hi, everyone: `> xxy-app@3.0.2 dist:win
• electron-builder version=23.6.0 os=3.10.0-1160.76.1.el7.x86_64 |
My Jenkins configuration commands are as follows:
|
i my case, don't use npx |
I am with this problem: • electron-builder version=24.6.4 os=10.0.19045
|
@GuilhermeAnselmodeSa your issue is different and also explicitly described in your error message
Closing this ticket as the posts in here are all different issues for a generic error code when electron-builder "can't execute". |
For anyone still battling with this issue make sure that the value of build.appId matches with the name property in your package.json For example: (package.json file) { Notice how they both have the name "hello". This fixed the issue for me. |
In my case it was my project path being to long. Moving it closer to the root file system resolved the issue. This seems to be a windows issue of some kind |
Yes, you saved my day. But I wonder where the doc points out this. And, I cannot use package name like |
I come to you because after several days of research I did not manage to correct this problem, when i try to create an nsis installer.
you will find attached my json file is the error.
if anyone has an answer to my problem please help me please.
node: v12.18.2
npm: 6.14.5
{
"name": "electron-quick-start",
"version": "2.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"repository": {
"type": "git",
"url": "git+https://github.com"
},
"keywords": [
"Electron"
],
"author": "GitHub",
"license": "CC0-1.0",
"devDependencies": {
"electron": "^9.1.0",
"electron-builder": "^22.0.0"
},
"scripts": {
"start": "electron .",
"pack": "electron-builder --dir",
"dist": "electron-builder"
},
"build": {
"appId": "yourappid",
"win": {
"target": "NSIS"
}
}
}
electron-builder version=22.7.0 os=10.0.19041
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist\builder-effective-config.yaml
• packaging platform=win32 arch=x64 electron=9.1.0 appOutDir=dist\win-unpacked
• default Electron icon is used reason=application icon is not set
• building target=nsis file=dist\electron-quick-start Setup 1.0.0.exe archs=x64 oneClick=true perMachine=false
⨯ C:\Users\C******_M*******\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.1\Bin\makensis.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:
The text was updated successfully, but these errors were encountered: