Error: myElectronApp.exe is not valid Win32 application


#1

Hi, I tried to pack my app with electron-packager but it kept saying “myApp.exe is not valid Win32 application”.

I’m using Windows 7, electron v1.4.8, nodeJs v6.9.1, npm v3.10.8.

This is my file structure:

iApp
---------app
-------------------package.json
-------------------main.js
-------------------index.html
---------build
-------------------icon.ico
-------------------background.png
---------dist
---------package.json

My package.json (development)
{
“name” : “iApp”,
“version” : “0.1.0”,
“main” : “main.js”,
“description”: “iApp test”,
“dependencies” : {
“dotenv” : “^2.0.0”,
“md5” : “^2.1.0”
},
“devDependencies” : {
“electron” : “1.4.8”,
“electron-builder”: “~5.12.X”,
“electron-prebuilt”: “~1.2.X”
},
“build”: {
“appId”: “com.electron.iapp” ,
“win”: {
“icon”: “build/icon.ico”
}
},
“scripts”: {
“pack”: “build --dir”,
“dist”: “build”
}
}

My package.json (application):
{
“name” : “iApp”,
“description”: “iApp test”,
“version” : “0.1.0”,
“main” : “main.js”,
“author”: “My Name ..@gmail.com
}

and I built it with:

build --win --ia32

all set up but it keep telling me that myApp.exe is not valid win32 application.
How can I fix this?

Thank you!