I am getting "Unable to load file" error while "dist:win": "build --platform win32 --arch all"
> npm run dist:win
> [email protected] dist:win /home/www/diva.com/otopark/divasoft.otopark.kapali/electron
> build --platform win32 --arch all
Skip app dependencies rebuild because platform is different
Removing /home/www/diva.com/otopark/divasoft.otopark.kapali/build/electron/win
Packaging app for platform win32 ia32 using electron v0.37.8
Error: Fatal error: Unable to load file
at ChildProcess.<anonymous> (/home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/rcedit/lib/rcedit.js:54:16)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:477:12)
From previous event:
at /home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/electron-builder/node_modules/electron-packager-tf/win32.js:37:60
From previous event:
at /home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/electron-builder/node_modules/electron-packager-tf/win32.js:32:16
at FSReqWrap.oncomplete (fs.js:82:15)
From previous event:
at buildWinApp (/home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/electron-builder/node_modules/electron-packager-tf/win32.js:15:10)
at /home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/electron-builder/node_modules/electron-packager-tf/common.js:233:7
at end (/home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/run-series/index.js:8:15)
at done (/home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/run-series/index.js:11:10)
at each (/home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/run-series/index.js:16:43)
at /home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/electron-builder/node_modules/electron-packager-tf/common.js:70:7
at next (/home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/rimraf/rimraf.js:74:7)
at FSReqWrap.CB [as oncomplete] (/home/www/diva.com/otopark/divasoft.otopark.kapali/electron/node_modules/rimraf/rimraf.js:110:9)
npm ERR! Linux 3.19.0-58-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dist:win"
npm ERR! node v4.4.3
npm ERR! npm v3.8.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dist:win: `build --platform win32 --arch all`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the [email protected] dist:win script 'build --platform win32 --arch all'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the divasoft.otopark.kapali package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! build --platform win32 --arch all
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs divasoft.otopark.kapali
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls divasoft.otopark.kapali
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/www/diva.com/otopark/divasoft.otopark.kapali/electron/npm-debug.log
/home/www/diva.com/otopark/divasoft.otopark.kapali/electron

When i use non-English characters on build.productName (package.json) I getting this error.
Thanks for info, I will investigate and fix.
Could you please provide example (well, I will try to use russian, but just to be sure).
"build": {
"app-bundle-id": "org.divasoft.otopark",
"app-category-type": "public.app-category.business",
"productName": "Divasoft Kapalı Otopark"
}
Do you expect that your exe will be named as "Divasoft Kapalı Otopark" or as name in the package.json?
Yes i am using "divasoft.otopark.kapali" for package.json name but its not understandable for customers so i alter with productName like docs said, i remove "kapalı" and new name is Divasoft OtoparkSetup-1.6.1-ia32.exe (by the way you should prefix "Setup" with a dash "-")
you should prefix "Setup" with a dash "-"
Why "should"?
remove "kapalı" and new name is Divasoft OtoparkSetup-1.6.1-ia32.exe
As workaround or as really desired name? What I want — I want to understand, should we in this case use safe name, or product name. Well, I am going to to leave product name (not sure, is it legal on Windows).
Well, you cant use special chars or spaces in package.json name section for known purposes, but when you creating end-user setup file, you want your exe name understandable for everyone. I have seen setup files with Turkish names before, i guess its legal on Windows.
"Divasoft OtoparkSetup" is not looking right, "Divasoft Otopark Setup" or "Divasoft Otopark-Setup" is looks better.
@brendtumi In the next dev next release will be Divasoft Otopark Setup 1.0.0.exe.
I have the same problem but in my case there is an Umlaut "ü" in the path.
C:\users\mkürbis\...
@develar Hi, seems rcedit project is not fixing this soon. Do you consider adding a workaround for this?
My idea is to rename the exe file with simple characters temporarily and restore the filename back after invoking rcedit. I did this manually.
Hope this helps.
@towertop Well, at first I will try to fix rcedit (oh, win c), and only then I will use ugly workaround (copy to temp file and rename back).
Is this problem solved? I got the save error output when I build the product with a Chinese name.. Any alternative way for build windows version?
@changkun Ok, I will try to fix rcedit tomorrow or implement workaround on our side.
Most helpful comment
@brendtumi In the next dev
nextrelease will beDivasoft Otopark Setup 1.0.0.exe.