|
1 | 1 | # Installation |
2 | 2 |
|
3 | | -> Tips for installing Electron |
4 | | -
|
5 | | -To install prebuilt Electron binaries, use [`npm`](https://docs.npmjs.com/). |
| 3 | +To install prebuilt Electron binaries, use [`npm`][npm]. |
6 | 4 | The preferred method is to install Electron as a development dependency in your |
7 | 5 | app: |
8 | 6 |
|
9 | 7 | ```sh |
10 | 8 | npm install electron --save-dev |
11 | 9 | ``` |
12 | 10 |
|
13 | | -See the |
14 | | -[Electron versioning doc](electron-versioning.md) |
15 | | -for info on how to manage Electron versions in your apps. |
| 11 | +See the [Electron versioning doc][versioning] for info on how to |
| 12 | +manage Electron versions in your apps. |
16 | 13 |
|
17 | 14 | ## Global Installation |
18 | 15 |
|
@@ -41,11 +38,12 @@ npm install --platform=win32 electron |
41 | 38 |
|
42 | 39 | ## Proxies |
43 | 40 |
|
44 | | -If you need to use an HTTP proxy you can [set these environment variables](https://github.com/request/request/tree/f0c4ec061141051988d1216c24936ad2e7d5c45d#controlling-proxy-behaviour-using-environment-variables). |
| 41 | +If you need to use an HTTP proxy you can [set these environment variables][proxy-env]. |
45 | 42 |
|
46 | 43 | ## Custom Mirrors and Caches |
47 | | -During installation, the `electron` module will call out to [`electron-download`](https://github.com/electron-userland/electron-download) to download prebuilt |
48 | | -binaries of Electron for your platform. It will do so by contacting GitHub's |
| 44 | +During installation, the `electron` module will call out to |
| 45 | +[`electron-download`][electron-download] to download prebuilt binaries of |
| 46 | +Electron for your platform. It will do so by contacting GitHub's |
49 | 47 | release download page (`https://github.com/electron/electron/releases/tag/v$VERSION`, |
50 | 48 | where `$VERSION` is the exact version of Electron). |
51 | 49 |
|
@@ -111,23 +109,33 @@ network problems. The best resolution is to try switching networks, or |
111 | 109 | just wait a bit and try installing again. |
112 | 110 |
|
113 | 111 | You can also attempt to download Electron directly from |
114 | | -[electron/electron/releases](https://github.com/electron/electron/releases) |
| 112 | +[electron/electron/releases][releases] |
115 | 113 | if installing via `npm` is failing. |
116 | 114 |
|
117 | 115 | If installation fails with an `EACCESS` error you may need to |
118 | | -[fix your npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions). |
| 116 | +[fix your npm permissions][npm-permissions]. |
119 | 117 |
|
120 | | -If the above error persists, the [unsafe-perm](https://docs.npmjs.com/misc/config#unsafe-perm) flag may need to be set to true: |
| 118 | +If the above error persists, the [unsafe-perm][unsafe-perm] flag may need to be |
| 119 | +set to true: |
121 | 120 |
|
122 | 121 | ```sh |
123 | 122 | sudo npm install electron --unsafe-perm=true |
124 | 123 | ``` |
125 | 124 |
|
126 | | -On slower networks, it may be advisable to use the `--verbose` flag in order to show download progress: |
| 125 | +On slower networks, it may be advisable to use the `--verbose` flag in order to |
| 126 | +show download progress: |
127 | 127 |
|
128 | 128 | ```sh |
129 | 129 | npm install --verbose electron |
130 | 130 | ``` |
131 | 131 |
|
132 | 132 | If you need to force a re-download of the asset and the SHASUM file set the |
133 | 133 | `force_no_cache` environment variable to `true`. |
| 134 | + |
| 135 | +[npm]: https://docs.npmjs.com |
| 136 | +[versioning]: ./electron-versioning.md |
| 137 | +[releases]: https://github.com/electron/electron/releases |
| 138 | +[proxy-env]: https://github.com/request/request/tree/f0c4ec061141051988d1216c24936ad2e7d5c45d#controlling-proxy-behaviour-using-environment-variables |
| 139 | +[electron-download]: https://github.com/electron-userland/electron-download |
| 140 | +[npm-permissions]: https://docs.npmjs.com/getting-started/fixing-npm-permissions |
| 141 | +[unsafe-perm]: https://docs.npmjs.com/misc/config#unsafe-perm |
0 commit comments