question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Application is not starting after adding electron-updater package

See original GitHub issue

After cloning this repo, I have made two changes to use electron-updater: Install electron-updater - npm install electron-updater --save and added below line to main.ts: import { autoUpdater } from 'electron-updater';

After this when I to do npm start, I get below errors:

node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.d.ts(2,27): error TS2305: Module '"http"' has no exported member 'OutgoingHttpHeaders'.
node_modules/electron-updater/out/AppUpdater.d.ts(4,10): error TS2305: Module '"http"' has no exported member 'OutgoingHttpHeaders'.
node_modules/electron-updater/out/Provider.d.ts(3,10): error TS2305: Module '"http"' has no exported member 'OutgoingHttpHeaders'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! angular-electron@2.6.0 build:electron:main: `tsc main.ts --outDir dist && copyfiles package.json dist && cd dist && npm install --prod && cd ..`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the angular-electron@2.6.0 build:electron:main script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/harshveer/.npm/_logs/2018-02-13T09_30_46_752Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! angular-electron@2.6.0 electron:serve: `npm run build:electron:main && electron ./dist --serve`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the angular-electron@2.6.0 electron:serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/harshveer/.npm/_logs/2018-02-13T09_30_46_777Z-debug.log
ERROR: "electron:serve" exited with 2.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-electron@2.6.0 start: `npm-run-all --parallel webpack:watch electron:serve`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the angular-electron@2.6.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/harshveer/.npm/_logs/2018-02-13T09_30_46_902Z-debug.log

Any idea why this might be?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
cjackson234commented, Feb 20, 2018

In the above code sample, you’re not using the ES6 import. Switching to this does solve the problem for me.

from the auto update docs:

Or if you don’t use ES6: const autoUpdater = require(“electron-updater”).autoUpdater

1reaction
seopeicommented, Feb 20, 2018

I am using electron-updater (v2.20.1), electron-builder (v20.0.6) and electron-publisher-s3 (v20.0.5) for publishing the app to amazon S3.

my electron-builder.json:

{
  "productName": "myProductName",
  "copyright": "Copyright by asdf",
  "appId": "my.app.id",
  "directories": {
    "app": "dist",
    "output": "app-builds"
  },
  "mac": {
    "icon": "dist/assets/icons/favicon",
    "category": "public.app-category.business",
    "target": [
      "zip",
      "dmg"
    ]
  },
  "win": {
    "icon": "dist/assets/icons/favicon",
    "target": [
      {
        "target": "nsis",
        "arch": [
          "x64",
          "ia32"
        ]
      },
      {
        "target": "portable",
        "arch": [
          "x64",
          "ia32"
        ]
      }
    ]
  },
  "publish": {
    "provider": "s3",
    "bucket": "placeholder_bucket_name",
    "region": "eu-west-1",
    "path": "updates"
  }
}

and in my main.ts:

const {autoUpdater} = require('electron-updater');
...
autoUpdater.checkForUpdatesAndNotify();

But maybe you should try this PR #129 with the newest version of all dependencies. I hope this will help 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

App doesn't start after update · Issue #5197 · electron ... - GitHub
Our clients after update to a new release of my application can't start the app. This issue occur not for all users, only...
Read more >
Electron-Updater detects update, but doesn't download it
The problem: electron-updater detects the new version, but does not download and install it.
Read more >
How to deploy an Electron app with auto-updates enabled for ...
Here's how to deploy an Electron app to macOS, Windows and Linux with the auto-update feature for free and with just one command....
Read more >
Get that damn Windows Auto Update working on Electron
The reason it fails is that I have added a line that tells Squirrel where it should find all my app releases in...
Read more >
Auto-updating apps for Windows and OSX using Electron
The good news is that the installer and updater for Windows is quite slick—it installs and launches the app on-the-fly, when you launch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found