PageSourceSearch

https://www.electronjs.org/assets/js/b9c6bec6.b384da2e.js

js electronjs.org collected 2026-10-01 07:19:04 UTC 7,444 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkelectronjs=self.webpackChunkelectronjs||[]).push([["20688"],{93528(e,n,t){t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>r,toc:()=>c});var r=t(21773),o=t(74848),l=t(28453);let s={title:"npm install electron",date:new Date("2016-08-16T00:00:00.000Z"),authors:"zeke",slug:"npm-install-electron",tags:["news"]},i,a={authorsImageUrls:[void 0]},c=[{value:"The prebuilt Electron binary",id:"the-prebuilt-electron-binary",level:2},{value:"The new name",id:"the-new-name",level:2},{value:"Prebuilt lives on",id:"prebuilt-lives-on",level:2},{value:"Many thanks",id:"many-thanks",level:2},{value:"Updating your projects",id:"updating-your-projects",level:2}];function h(e){let n={a:"a",code:"code",h2:"h2",hr:"hr",img:"img",p:"p",...(0,l.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["As of Electron version 1.3.1, you can ",(0,o.jsx)(n.code,{children:"npm install electron --save-dev"})," to\ninstall the latest precompiled version of Electron in your app."]}),"\n",(0,o.jsx)(n.hr,{}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{src:"https://cloud.githubusercontent.com/assets/378023/17259327/3e3196be-55cb-11e6-8156-525e9c45e66e.png",alt:"npm install electron"})}),"\n",(0,o.jsx)(n.h2,{id:"the-prebuilt-electron-binary",children:"The prebuilt Electron binary"}),"\n",(0,o.jsxs)(n.p,{children:["If you've ever worked on an Electron app before, you've likely come across the\n",(0,o.jsx)(n.code,{children:"electron-prebuilt"})," npm package. This package is an indispensable part of nearly\nevery Electron project. When installed, it detects your operating system\nand downloads a prebuilt binary that is compiled to work on your system's\narchitecture."]}),"\n",(0,o.jsx)(n.h2,{id:"the-new-name",children:"The new name"}),"\n",(0,o.jsxs)(n.p,{children:["The Electron installation process was often a stumbling block for new developers.\nMany brave people tried to get started developing an Electron by app by running\n",(0,o.jsx)(n.code,{children:"npm install electron"})," instead of ",(0,o.jsx)(n.code,{children:"npm install electron-prebuilt"}),",\nonly to discover (often after much confusion) that it was not the ",(0,o.jsx)(n.code,{children:"electron"}),"\nthey were looking for."]}),"\n",(0,o.jsxs)(n.p,{children:["This was because there was an existing ",(0,o.jsx)(n.code,{children:"electron"})," project on npm,\ncreated before GitHub's Electron project existed. To help make Electron\ndevelopment easier and more intuitive for new developers, we reached out to the\nowner of the existing ",(0,o.jsx)(n.code,{children:"electron"})," npm package to ask if he'd be willing to let us use\nthe name. Luckily he was a fan of our project, and agreed to help us repurpose\nthe name."]}),"\n",(0,o.jsx)(n.h2,{id:"prebuilt-lives-on",children:"Prebuilt lives on"}),"\n",(0,o.jsxs)(n.p,{children:["As of version 1.3.1, we have begun publishing\n",(0,o.jsx)(n.a,{href:"https://www.npmjs.com/package/electron",children:(0,o.jsx)(n.code,{children:"electron"})})," and ",(0,o.jsx)(n.code,{children:"electron-prebuilt"}),"\npackages to npm in tandem. The two packages are identical. We chose to continue publishing\nthe package under both names for a while so as not to inconvenience the\nthousands of developers who are currently using ",(0,o.jsx)(n.code,{children:"electron-prebuilt"})," in their projects.\nWe recommend updating your ",(0,o.jsx)(n.code,{children:"package.json"})," files to use the new ",(0,o.jsx)(n.code,{children:"electron"})," dependency,\nbut we will continue releasing new versions of ",(0,o.jsx)(n.code,{children:"electron-prebuilt"})," until the\nend of 2016."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"https://github.com/electron-userland/electron-prebuilt",children:"electron-userland/electron-prebuilt"}),"\nrepository will remain the canonical home of the ",(0,o.jsx)(n.code,{children:"electron"})," npm package."]}),"\n",(0,o.jsx)(n.h2,{id:"many-thanks",children:"Many thanks"}),"\n",(0,o.jsxs)(n.p,{children:["We owe a special thanks to ",(0,o.jsx)(n.a,{href:"https://github.com/mafintosh",children:"@mafintosh"}),",\n",(0,o.jsx)(n.a,{href:"https://github.com/maxogden",children:"@maxogden"}),", and many other ",(0,o.jsx)(n.a,{href:"https://github.com/electron-userland/electron-prebuilt/graphs/contributors",children:"contributors"}),"\nfor creating and maintaining ",(0,o.jsx)(n.code,{children:"electron-prebuilt"}),", and for their tireless service\nto the JavaScript, Node.js, and Electron communities."]}),"\n",(0,o.jsxs)(n.p,{children:["And thanks to ",(0,o.jsx)(n.a,{href:"https://github.com/logicalparadox",children:"@logicalparadox"})," for allowing\nus to take over the ",(0,o.jsx)(n.code,{children:"electron"})," package on npm."]}),"\n",(0,o.jsx)(n.h2,{id:"updating-your-projects",children:"Updating your projects"}),"\n",(0,o.jsxs)(n.p,{children:["We've worked with the community to update popular packages that are affected\nby this change. Packages like\n",(0,o.jsx)(n.a,{href:"https://github.com/electron-userland/electron-packager",children:"electron-packager"}),",\n",(0,o.jsx)(n.a,{href:"https://github.com/electron/electron-rebuild",children:"electron-rebuild"}),", and\n",(0,o.jsx)(n.a,{href:"https://github.com/electron-userland/electron-builder",children:"electron-builder"}),"\nhave already been updated to work with the new name while continuing to supp
1ort\nthe old name."]}),"\n",(0,o.jsxs)(n.p,{children:["If you encounter any problems installing this new package, please let us know by\nopening an issue on the\n",(0,o.jsx)(n.a,{href:"https://github.com/electron-userland/electron-prebuilt/issues",children:"electron-userland/electron-prebuilt"}),"\nrepository."]}),"\n",(0,o.jsxs)(n.p,{children:["For any other issues with Electron,\nplease use the ",(0,o.jsx)(n.a,{href:"https://github.com/electron/electron/issues",children:"electron/electron"}),"\nrepository."]})]})}function p(e={}){let{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},28453(e,n,t){t.d(n,{R:()=>s,x:()=>i});var r=t(96540);let o={},l=r.createContext(o);function s(e){let n=r.useContext(l);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),r.createElement(l.Provider,{value:n},e.children)}},21773(e){e.exports=JSON.parse('{"permalink":"/blog/npm-install-electron","source":"@site/blog/npm-install-electron.md","title":"npm install electron","description":"As of Electron version 1.3.1, you can npm install electron --save-dev to","date":"2016-08-16T00:00:00.000Z","tags":[{"inline":false,"label":"Project News","permalink":"/blog/tags/news","description":"Important announcements about the Electron project"}],"readingTime":2.48,"hasTruncateMarker":false,"authors":[{"name":"zeke","url":"https://github.com/zeke","imageURL":"https://github.com/zeke.png?size=96","key":"zeke","page":null}],"frontMatter":{"title":"npm install electron","date":"2016-08-16T00:00:00.000Z","authors":"zeke","slug":"npm-install-electron","tags":["news"]},"unlisted":false,"prevItem":{"title":"Accessibility Tools","permalink":"/blog/accessibility-tools"},"nextItem":{"title":"Electron Internals: Using Node as a Library","permalink":"/blog/electron-internals-using-node-as-a-library"}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.