Make sure you're using the latest electron-builder:
"electron-builder": "^20.8.0",Or add it:
npm install --save-dev electron-builderYou can run build directly:
npx build --linux snapBut it's quicker to iterate in a persistent Docker container:
docker run -ti -v $PWD:$PWD -w $PWD electronuserland/builder /bin/bashOnce inside the Docker container, make sure you don't have node_modules from Mac (rm -rf node_modules):
/Users/ev/Branches/ramme/node_modules/node-sass/lib/binding.js:15
throw new Error(errors.missingBinary());
^
Error: Missing binding /Users/ev/Branches/ramme/node_modules/node-sass/vendor/linux-x64-57/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 9.xAnd if you get chmod errors:
npm cache clean --forceMake sure you have the latest snapcraft and Node.js:
apt update; apt install snapcraft nodejsCut to the chase when building debs, rpms, etc:
npm run dist -- --linux snapBut use yarn:
npm i
> [email protected] postinstall /Users/ev/Branches/reactide
> electron-builder install-app-deps
sh: 1: electron-builder: not found