21

Saw many times that package name, but did't get when do I need to install it instead of common electron...

George Welder
  • 3,787
  • 11
  • 39
  • 75
GProst
  • 9,229
  • 3
  • 25
  • 47

1 Answers1

46

The short answer is if you want to write an Electron app today you should forget electron-prebuilt ever existed and always install the electron package instead.

The long answer is that there used to be an NPM package called electron that was completely unrelated to Electron, so the Electron team had to use another name to distribute Electron on NPM, hence electron-prebuilt. Later on the author of the electron package kindly transferred the name to the Electron team so that they could publish Electron under that name, and put an end to people accidentally installing the wrong package.

George Welder
  • 3,787
  • 11
  • 39
  • 75
Vadim Macagon
  • 14,463
  • 2
  • 52
  • 45
  • 2
    Wow I never heard of this anywhere, cool fact, I was always curious about this. I just assumed that the default Electron package was un-built and was just source code, so they used electron-prebuilt to give you the full application – Mister SirCode Dec 02 '19 at 10:46
  • If you're curious (as I was) why they chose "prebuilt" as the suffix to use, it's explained here: https://electronjs.org/blog/npm-install-electron – Aaron Jan 19 '20 at 19:07