Skip to content

Instantly share code, notes, and snippets.

@seekerlee
Last active March 19, 2018 12:41
Show Gist options
  • Save seekerlee/a7be57c96c01cc7822914b22fe4ba5d8 to your computer and use it in GitHub Desktop.
Save seekerlee/a7be57c96c01cc7822914b22fe4ba5d8 to your computer and use it in GitHub Desktop.
electron build native
# Electron's version. which can be found at node_modules/electron/package.json my version is 1.7.11
export npm_config_target=1.8.4
# The architecture of Electron, can be ia32 or x64.
export npm_config_arch=x64
export npm_config_target_arch=x64
# Download headers for Electron.
export npm_config_disturl=https://atom.io/download/electron
# Tell node-pre-gyp that we are building for Electron.
export npm_config_runtime=electron
# Tell node-pre-gyp to build module from source code.
export npm_config_build_from_source=true
# Install all dependencies, and store cache to ~/.electron-gyp.
HOME=~/.electron-gyp npm install
# finally npm rebuid
HOME=~/.electron-gyp npm rebuild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment