My Profile Photo

Sheogorath's Blog

Electron-builder offline

Today I learned how hard it is to package electron-based applications in an offline environment. It’s not just electron itself that causes issues, but various build steps/packages in the node ecosystem simply assume that an internet connection is accessible and will fail if they can’t call the network. Today I encountered yarn that only works offline, when you pass the --offline flag to it, which doesn’t work when it’s called within project shell-scripts you don’t control. I encountered electron-builder that will download various libraries and doesn’t want you do something about it or offer to pre-download them via dependency management. All in all, it was a rather frustrating experience and didn’t end as productive as I would have wished for.

The reason I faced this today, was yet another attempt to build the Element (previously known as Riot) Flatpak from Element’s source instead of repackaging their .deb-package. It didn’t work out yet, but at least there was some progress. 2 more attempts and things might be ready. But it’s a lot of work and requires some patching, which is rather annoying. Once things work, I’ll try to push them upstream but needs some tinkering.