Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 67e1b59

Browse files
hugomrdiasAlan Shaw
authored andcommitted
fix: upgrade electron examples (#2104)
1 parent ba80e40 commit 67e1b59

File tree

3 files changed

+4
-35
lines changed

3 files changed

+4
-35
lines changed

README.md

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -946,25 +946,8 @@ A way to mitigate this in Chrome, is to run your IPFS node inside a Service Work
946946
947947
Yes you can and in many ways. Read https://github.com/ipfs/notes/issues/256 for the multiple options.
948948
949-
If your [electron-rebuild step is failing](https://github.com/ipfs/js-ipfs/issues/843), all you need to do is:
950-
951-
```bash
952-
# Electron's version.
953-
export npm_config_target=2.0.0
954-
# The architecture of Electron, can be ia32 or x64.
955-
export npm_config_arch=x64
956-
export npm_config_target_arch=x64
957-
# Download headers for Electron.
958-
export npm_config_disturl=https://atom.io/download/electron
959-
# Tell node-pre-gyp that we are building for Electron.
960-
export npm_config_runtime=electron
961-
# Tell node-pre-gyp to build module from source code.
962-
export npm_config_build_from_source=true
963-
# Install all dependencies, and store cache to ~/.electron-gyp.
964-
HOME=~/.electron-gyp npm install
965-
```
966-
967-
If you find any other issue, please check the [`Electron Support` issue](https://github.com/ipfs/js-ipfs/issues/843).
949+
We now support Electron v5.0.0 without the need to rebuilt native modules.
950+
Still if you run into problems with native modules follow these instructions [here](https://electronjs.org/docs/tutorial/using-native-node-modules).
968951
969952
#### Have more questions?
970953

examples/run-in-electron/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"description": "A minimal Electron application with js-ipfs",
55
"main": "main.js",
66
"scripts": {
7-
"start": "electron .",
8-
"postinstall": "./rebuild.sh"
7+
"start": "electron ."
98
},
109
"keywords": [
1110
"Electron",
@@ -15,7 +14,7 @@
1514
"author": "David Dias <daviddias@ipfs.io>",
1615
"license": "MIT",
1716
"devDependencies": {
18-
"electron": "^4.2.0",
17+
"electron": "^5.0.2",
1918
"electron-rebuild": "^1.8.4",
2019
"ipfs": "ipfs/js-ipfs"
2120
},

examples/run-in-electron/rebuild.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)