Jovan
Jovan

Reputation: 311

How to fix "Skip checkForUpdatesAndNotify because application is not packed" in electron.js

I'm using "electron-updater" to check for auto-updating Electron application.

Calling "checkForUpdatesAndNotify()" function.

In a console, I get "Skip checkForUpdatesAndNotify because application is not packed".

Upvotes: 16

Views: 11967

Answers (3)

Beau
Beau

Reputation: 11358

Nowadays the right thing to do is specify your dev config in dev-app-update.yml and then do this before you call autoUpdater.checkForUpdatesAndNotify():

autoUpdater.forceDevUpdateConfig = true;

Upvotes: 2

B4Le
B4Le

Reputation: 83

use autoUpdater.checkForUpdates instead

Upvotes: 0

xcodebuild
xcodebuild

Reputation: 1221

checkForUpdatesAndNotify() just won't work in development mode.

If you insist on test it in dev mode, you can do some hack with isPackaged:

const app = require('electron').app;

Object.defineProperty(app, 'isPackaged', {
  get() {
    return true;
  }
});

Be careful, do not use this hack for production, it may

Upvotes: 16

Related Questions