The issue started when upgrading electron-builder from version 17.8.0 to 19.5.1
running npm install throws two errors:
UNMET PEER DEPENDENCY [email protected] (which i fixed by wrriting "ajv": "5.2.0" to my devDependecies) ⚠️ Please use as subcommand: electron-builder install-app-depsthen building my installer with build --win --ia32 --x64 --publish never runs as expected. When executing the installer it runs without errors or warnings but still no application menu entry is created. if the program was already installed the entry gets deleted. Therefore auto updating does also not work.
package.json
...
"devDependencies": {
"electron": "1.6.9",
"electron-builder": "19.5.1"
},
"dependencies": {
"jquery": "3.2.1",
"electron-debug": "1.1.0",
"electron-updater": "1.16.0",
"electron-publisher-s3": "18.3.0",
"color": "1.0.3"
},
"scripts": {
"postinstall": "install-app-deps",
"start": "electron . --dev",
"start-prod": "electron .",
"build": "build --win --x64 --publish always",
"build-multiarch": "build --win --ia32 --x64 --publish always",
"build-multiarch-no-upload": "build --win --ia32 --x64 --publish never"
},
"build": {
"forceCodeSigning": false,
"nsis": {
"allowToChangeInstallationDirectory": false
},
"directories": {
"output": "dist"
},
"publish": {
"provider": "s3",
"bucket": "desktop.app",
"path": "desktop-app"
}
}
}
Fixed it by manualy deleting the install folder in C:\Users\Jonas\AppData\Local\Programs\appname
We don't create shortcuts if previous app exe existed. Is it ok or do you observe something wrong?
Ouch — I realize — new installer doesn't create shortcuts because app exe exists, but old uninstaller is not aware about new flags. And deletes existing shortcuts.
Yeah, and thats a problem if you want users to auto-update :)
I encountered this too after upgrading my app from electron-builder 18.8.1 to 19.6.0. I'm building natively on Windows 10.
My app builds successfully, but when I run build/appname Setup x.x.x.exe the installer finishes but doesn't launch the app automatically, and doesn't create an application menu entry for it either.
@balugege's tip to delete the install folder C:\Users\username\AppData\Local\Programs\appname worked for me. The next time I ran my app's setup .exe it automatically opened the app, added the menu entry, and created the Desktop shortcut.
fixed in 19.6.1 @balugege Thanks a lot for reporting this.
Thanks for fixing it ;)
Most helpful comment
fixed in 19.6.1 @balugege Thanks a lot for reporting this.