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.

Etcher-cli builds a bunch of unnecessary electron deps

See original GitHub issue
  • Etcher version: 1.4.4
  • Operating system and architecture: macOS 10.13.6
  • Image flashed: n/a
  • Do you see any meaningful error information in the DevTools? n/a

When building with make package-cli RELEASE_TYPE=production, it takes about 30 minutes on my laptop (13" 2012 rMBP), most of which is in electron dependencies.

By applying the patches described in https://github.com/chrmoritz/homebrew-core/blob/cf5e86e9d301d82df04dc6e1d137f69f8bc1d7c2/Formula/etcher-cli.rb , build time drops to about 2 minutes.

The relevant changes that speed up building:

  • removing ‘@fortawesome’, ‘@types’, ‘angular’, ‘react’, ‘redux’, ‘electron’ from dependencies
  • removing devDependencies
  • setting files to be bin, build, lib/cli, lib/sdk, lib/shared, and binding.gyp
  • getting rid of npm-shrinkwrap so these changes to get overridden

Of course this only works for etcher-cli. I’m not familiar with Makefiles or how this could be officially supported, but is there a way?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
jhermsmeiercommented, Aug 28, 2018

I guess to do this “officially” there’d need to be different package.json files for the GUI and CLI? I doubt that’s something the Etcher developers are interested in though.

The GUI & CLI will eventually become two separate things with the new Etcher SDK (once that’s finished), also to avoid having this interlinked mess of deps that aren’t used by the other. So I’d argue it is something we’re interested in 😛

2reactions
lurchcommented, Aug 23, 2018

🤷‍♂️ You might also want to take a look at #2403

Read more comments on GitHub >

github_iconTop Results From Across the Web

electron/DEPS at main - GitHub
electron : Build cross-platform desktop apps with JavaScript, HTML, and CSS - electron/DEPS at main · electron/electron.
Read more >
Build Instructions | Electron
Follow the guidelines below for building Electron itself, ... follow Chromium's guide to get the necessary dependencies, SDK and libraries, then build with ......
Read more >
installing electron app is too slow because of native ...
json has all dependencies which is necessary for app running. So I package app folder using electron-packager, then build installer for windows ...
Read more >
Common Configuration - electron-builder
npmRebuild = true Boolean - Whether to rebuild native dependencies before starting to package the app. buildNumber String | “undefined” - The build...
Read more >
How to build an Electron app using create-react-app ... - Medium
And Electron is GitHub's framework for building cross-platform desktop apps ... necessary for React development. webpack is a configuration and build tool ...
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