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.

Error while packaging with electron-builder

See original GitHub issue

Hi,

I am running into a issue while packaging the app for distribution using electron-builder. (macOS) While the electron-releases#v10.0.0-wvvmp-beta.25 is specified in my Dependecies in package.json:

"devDependencies": { "electron": "https://github.com/castlabs/electron-releases#v10.0.0-wvvmp-beta.25", "electron-builder": "^22.8.0" }

yarn or npm is still crashing on following:

" ⨯ cannot resolve https://github.com/electron/electron/releases/download/v10.0.0-wvvmp-beta.25/electron-v10.0.0-wvvmp-beta.25-darwin-x64.zip: status code 404"

It is obviously trying to connect to the official electron GitHub repo and download the fork from there. Any idea how to fix it ?

Best regards, Ondrej

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
khwaajcommented, Aug 27, 2020

I can’t remember exactly but I think they moved this option at some point. Anyway, you need to include it under build in your package.json and add an extra v compared to the above URL. E.g. something like this:

{
  "name": "MyApp",
  ...,
  "build": {
    "electronDownload": {
      "mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
    },
    ...,
    "afterPack": "build/after-pack.js",
    "afterSign": "build/after-sign.js"
  }
}

It might work with environment variables too, but I’ve not tested that.

0reactions
oliexecommented, Aug 27, 2020

I can’t remember exactly but I think they moved this option at some point. Anyway, you need to include it under build in your package.json and add an extra v compared to the above URL. E.g. something like this:

{
  "name": "MyApp",
  ...,
  "build": {
    "electronDownload": {
      "mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
    },
    ...,
    "afterPack": "build/after-pack.js",
    "afterSign": "build/after-sign.js"
  }
}

It might work with environment variables too, but I’ve not tested that.

Emil, yet again you are absolute lifesaver. The “v” and the end of the url was the issue (And I can see why now…).

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am having a problem while packaging my electron app using ...
1 Answer 1 ... electron-builder does not include devDependencies in the packaged application since they're exclusive for development, you should ...
Read more >
Build process hangs on 'packaging' · Issue #3037 · electron ...
The problem is in the app-builder-bin module. I am using Windows 10. It hangs on the app-builder-bin node-dep-tree task, which should normally ...
Read more >
Application Contents - electron-builder
A glob patterns relative to the app directory, which specifies which files to include when copying files to create the package. Defaults to:...
Read more >
How to use the electron-builder.build function in ... - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately. Enable here. github BenjaminDobler /...
Read more >
electron-packager - npm
Customize and package your Electron app with OS-specific bundles (.app, ... Start using electron-packager in your project by running `npm i ...
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