When attempting to build for Windows on a Windows Native client The process proceeds as expected
• electron-builder version=21.0.15 os=10.0.17134
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist\builder-effective-config.yaml
• packaging platform=win32 arch=x64 electron=5.0.6 appOutDir=dist\win-unpacked
• building target=nsis file=dist\project.exe archs=x64 oneClick=true perMachine=false
⨯ [object Object]
And does not seem to make an exe of any kind in the /dist folder. There is no further information then [object Object]. It may be worth noting that when building the same project for Mac and Linux it completes successfully and without issue. I have also tried to make use of the docker image under the Multi Platform section, it ends with the same error when attempting to build for windows.
Corrected:
@Alnarra I run into a problem like this too! I think this is a bug, in my case, the problem is the icon.ico file is wrong somehow. When I remove the ico file, packing will success, the bug is, in version 21.x.x the error message can not be shown successfully, (instead, [object object] was shown), so it is hard for the user to find what is wrong. And 20.x.x version has no problem like this.
Maybe we should open this issue again to let maintainer notice this
Same here. I had to downgrade as well. @Alnarra can you reopen this issue?
Per Request, Reopening
Hello guys!
I just experienced this and for me it had to do with the icon, the error at the end of the logs:
• electron-builder version=21.1.1 os=10.0.17134
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist\builder-effective-config.yaml
• packaging platform=win32 arch=x64 electron=5.0.8 appOutDir=dist\win-unpacked
• building target=nsis file=dist\SomeApp Setup 1.0.0.exe archs=x64 oneClick=false perMachine=true
⨯ [object Object]
I created my icons with GIMP and what caused the issue to me was saving the icon files with no compression, so when I tried again but this time by checking "PNG compression" it went all good:
• electron-builder version=21.1.1 os=10.0.17134
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist\builder-effective-config.yaml
• packaging platform=win32 arch=x64 electron=5.0.8 appOutDir=dist\win-unpacked
• building target=nsis file=dist\SomeApp Setup 1.0.0.exe archs=x64 oneClick=false perMachine=true
• building block map blockMapFile=dist\SomeApp Setup 1.0.0.exe.blockmap
I hope it helps :)
In my case I got this, anyone can help? I'm using a working NSIS custom script but I got this error
...
• uninstaller is not signed by electron-builder reason=custom NSIS script is used
⨯ [object Object]
Hi @aziks,
I got the same issue with you. Did you know problem?
In my case I got this, anyone can help? I'm using a working NSIS custom script but I got this error
...
• uninstaller is not signed by electron-builder reason=custom NSIS script is used
⨯ [object Object]
Hi @taduyde
I can't resolve this problem, but I think is realted to this https://github.com/electron-userland/electron-builder/issues/526
If someone can give some insight it would be awesome!
Hi Every body,
Any update for this issue?
Hi Folks, I'm facing the same problem.
Any update ?
Illegal filename change to Normal filename
same problem here. I am using 256x256 png for the icon. above solutions did not work for me.
<<<<< building for windows on linux >>>>
`
`
Using electron-builder: v21.2.0
https://github.com/electron-userland/electron-builder/issues/4045#issuecomment-517971201
I checked the comments above.
https://forum.getkirby.com/t/how-to-make-a-proper-compressed-favicon-ico/2725
We fixed it by exporting the icon file to PNG compression as described in the link above.
I had same issue but for me nothing from above worked. I have tried PNG compression as mentioned above with no luck.
I have observed that I had very little free disc space on my SDD about 500 MB before build. It was no problem before but now I have tried to clean a bit my disk space and now I have about 3 GB free space and build started working.
Just wanted to add that I also get an error [object Object] exit code 1, in my case when it's trying to sign a specific file, when using electron-builder 22.1.0.
My workaround was to downgrade to electron-builder 20.44.4 (as mentioned above) which allowed me to get a proper log output to investigate the issue. In my case I had misspelled the name of a directory in my customInstall macro in a .nsh file. I then upgraded to 22.1.0 again and it worked like a charm.
So I guess my point is, the error logging seems broken in 22.1.0
Encountered this issue using electron-builder 21.2.0, error message was only [Object object].

Downgraded to 20.44.4 and the actual error was this^. I'm now able to make things work again.
Similar issue with version 22.2.0 for https://github.com/4ian/GDevelop
Here are the logs in the hope it's helpful. I compiled with --win --linux tar.gz as arguments.
Downgrading to 20.44.4 fixes the issue (the build is successful without any error message). I've not yet tried intermediate versions.
• electron-builder version=22.2.0 os=17.7.0
• loaded configuration file=package.json ("build" field)
• rebuilding native dependencies [email protected] platform=linux arch=x64
• packaging platform=linux arch=x64 electron=3.0.9 appOutDir=dist/linux-unpacked
• building target=tar.gz arch=x64 file=dist/gdevelop-5.0.0-beta88.tar.gz
• rebuilding native dependencies [email protected] platform=win32 arch=x64
• packaging platform=win32 arch=x64 electron=3.0.9 appOutDir=dist/win-unpacked
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.5.0/winCodeSign-2.5.0.7z size=5.6 MB parts=1
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.5.0/winCodeSign-2.5.0.7z duration=3.855s
• building target=nsis file=dist/GDevelop 5 Setup 5.0.0-beta88.exe archs=x64 oneClick=true perMachine=false
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1.7z size=1.3 MB parts=1
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1.7z duration=3.073s
• downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z size=731 kB parts=1
• downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z duration=4.229s
⨯ [object Object]
Happy to provide other informations or open a new issue if needed.
Version ^22.2.0 is failing for me on AppVeyor where I am building for Windows.
The same version works fine on TravisCI where I am building for Linux and MacOS.
Downgrading to 20.44.4 works fine everywhere.
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.
@hovancik I don't known why the issue is closed but I still get same error with both electron-builder version 20.44.4 and 21.2.0:
uninstaller is not signed by electron-builder reason=custom NSIS script is used
⨯ [object Object]
version 20.44.4 does provide more information but failed to generate the uninstaller, either.
here is my config:
"nsis": {
"warningsAsErrors": false,
"shortcutName": "My App 6.0",
"oneClick": false,
"perMachine": false,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"script": "build/installer.nsi",
"license": "license.txt"
},
I have to use my custom "installer.nsi" because I want to override some macro in "multiUser.nsh", the only difference between my "installer.nsi" and default "installer.nsi" is:
!include "multiUser_custom.nsh"
I am not sure when this issue will be fixed.
@lvbeck try latest version, I am not having this issue anymore
@hovancik I upgraded to the latest 22.6.0, now another error occurred:
\node_modules\electron-builder\node_modules\fs-extra\lib\mkdirs\make-dir.js:86
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (\node_modules\electron-builder\node_modules\fs-extra\lib\mkdirs\index.js:3:44)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `node .electron-vue/build.js && electron-builder`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! \AppData\Roaming\npm-cache\_logs\2020-05-05T10_16_33_677Z-debug.log
@lvbeck did you found the solution to your issue?
im having the same error while running electron-builder
/node_modules/electron-builder/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
} catch {
^
SyntaxError: Unexpected token {
@alphonsoTheGreat still not, I will test the next release later.
I'm on version 22.7.0 and have the same issue.
node_modules/electron-builder/node_modules/fs-extra/lib/mkdirs/make-dir.js:85 } catch { ^ SyntaxError: Unexpected token {
@lvbeck Can I know which version works for you so I can downgrade to that?
@talhaanees if you don't have custom NSIS script "script": "build/installer.nsi" in the nsis section, try version 20.44.4, this works only with "include": "build/installer.nsh".
for me, I have to override the default installer.nsi completely, there is no working solution.
So, I did some playing around and eventually it did work for me with the latest version (22.7.0).
My code was in an external SSD. I copied it all to a local drive cleaned install everything (remove node_modules and package-lock) and it works. No object issues, no make-dir issue.
Still doesn't work with this version in Ext SSD. But it works with 20.44.4 in both cases.
Most helpful comment
Maybe we should open this issue again to let maintainer notice this