Make sure you're using the latest electron-builder:
"electron-builder": "^20.8.0",
Or add it:
npm install --save-dev electron-builder
You can run build
directly:
npx build --linux snap
But it's quicker to iterate in a persistent Docker container:
docker run -ti -v $PWD:$PWD -w $PWD electronuserland/builder /bin/bash
Once 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.x
And if you get chmod errors:
npm cache clean --force
Make sure you have the latest snapcraft and Node.js:
apt update; apt install snapcraft nodejs
Cut to the chase when building debs, rpms, etc:
npm run dist -- --linux snap
But use yarn:
npm i
> reactide@1.0.0 postinstall /Users/ev/Branches/reactide
> electron-builder install-app-deps
sh: 1: electron-builder: not found