app-update.yml not generated when using --prepackaged flag
See original GitHub issue- Version: “electron-builder”: “^20.8.1”, “electron-updater”: “^2.21.4”,
- Target: Windows/NSIS
A similar issue is found here: #2667 but what worked for op didn’t work for me.
I am trying to get auto-update working in my application but can’t seem to get past this error about missing app-update.yml
.
After running this build script: "package-win-release": "build --win --ia32 --prepackaged ./release/win-ia32-unpacked"
, an installer is generated as well as the latest.yml
file.
After running the installer, starting the app, and looking at the log file found here C:\Users\userName\AppData\Roaming\myApp
for auto-update, I’m seeing this:
[2018-03-30 14:55:28.935] [info] ---- checking for update...
[2018-03-30 14:55:28.966] [info] Checking for update
[2018-03-30 14:55:28.966] [info] Checking for update...
[2018-03-30 14:55:29.639] [error] Error: Error: ENOENT: no such file or directory, open 'C:\Program Files (x86)\myApp\resources\app-update.yml'
at t.NsisUpdater.loadUpdateConfig (C:\Program Files (x86)\myApp\resources\app.asar\webpack:\node_modules\electron-updater\out\AppUpdater.js:508:1)
at t.Lazy.configOnDisk [as creator] (C:\Program Files (x86)\myApp\resources\app.asar\webpack:\node_modules\electron-updater\out\AppUpdater.js:210:1)
at t.Lazy.get value [as value] (C:\Program Files (x86)\myApp\resources\app.asar\webpack:\node_modules\lazy-val\out\main.js:22:1)
at t.NsisUpdater.getUpdateInfo (C:\Program Files (x86)\myApp\resources\app.asar\webpack:\node_modules\electron-updater\out\AppUpdater.js:421:1)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:109:7)
[2018-03-30 14:55:29.639] [info] Error updating app.
package.json build configuration below. I’ve added the publish configuration to all of the areas that I’ve seen examples of. I’ve also tried setting the publish configuration in those specific areas but still no luck.
"build": {
"productName": "my product name",
"appId": "com.app.id",
"compression": "normal",
"nodeGypRebuild": false,
"asar": true,
"files": [
"dist/",
"node_modules/",
"app.html",
"main.prod.js",
"main.prod.js.map",
"package.json"
],
"extraFiles": [],
"dmg": {
"contents": [
{
"x": 130,
"y": 220
},
{
"x": 410,
"y": 220,
"type": "link",
"path": "/Applications"
}
]
},
"target": [
"nsis"
],
"publish": [{
"provider": "generic",
"url": "http://localhost:8088"
}],
"win": {
"target": "nsis",
"publisherName": "publisher",
"icon": "resources/icon",
"publish": [{
"provider": "generic",
"url": "http://localhost:8088"
}]
},
"linux": {
"target": [
"deb",
"AppImage"
],
"category": "Development"
},
"nsis": {
"oneClick": false,
"allowElevation": true,
"perMachine": true,
"artifactName": "${productName}-Setup.${buildVersion}.${ext}",
"publish": [{
"provider": "generic",
"url": "http://localhost:8088"
}]
},
"directories": {
"buildResources": "resources",
"output": "release"
}
},
UPDATE 4/2/2018: After removing --prepackaged
flag from the build script, the app-update.yml
file is generated but the application is not working. How does the --prepackaged
flag affect the build and creation of app-update.yml?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top GitHub Comments
+1, I am facing the same issue
I’m having the same issue, please reopen this.