Closed dhtnetwork closed 4 years ago
@dhtnetwork there are nix commands documented in the readme nix-shell --run holoscape
and nix-shell --run holoscape-flush
that wrap electron correctly
So these rather cryptic errors all boil down to a simple cause: the Holochain binaries are missing.
Last week we added a dialog to make this situation more clear if somebody runs into it: https://github.com/holochain/holoscape/pull/39
But above listings show a usage that is not documented anyway (i.e. just running npm start
).
@thedavidmeister added a nix command holoscape
that automatically pulls binaries from Holonix. This is also documented in the readme as the way to go. In the listings above, the user ran npm start
directly without copying binaries manually and without running the documented nix command. Either should fix it.
note, the nix command copies the binaries into place and wraps the version of electron that is nix friendly (the one that npm drops into place will probably die if you try to use it directly)
Notes from a user trying to run Holoscape.
=== My feedback on installing Holoscape and attempting to use it to bundle an app:
I used the same Vagrant VM (based on NixOS) in which I completed the "Install Holochain" tasks to attempt my installation of Holoscape. I ran into some problems, detailed in this journal, that prevented me from ultimately running the Holoscape Electron package.
Attempts to start Holoscape using the
npm start
invocation documented on the Holoscape README file returns an error:I encountered a similar error when attempting to build the Linux variant of the stand-alone Holoscape package:
In this case, it was because the
unzip
command was not found. Installing this command on NixOS requires the addition of thenixos.unzip
attribute to the running environment:With
unzip
installed, Holoscape can be built:Unfortunately, when attempting to run Holoscape, two additional problems present themselves:
electron
binary is not yet in the path (because it has not been documented to be required). The fix, of course, is to add it to the shell's search path by ensuring that `./node_modules/.bin" is present.Note that it is not feasible to easily install NPM packages globally in this NixOS environment because the NixOS package store is read-only. Thus, commands to workaround the Electron error such as
npm install -g --unsafe-perm=true --allow-root
fail with a filesystem-level "permission denied" error.Once the
electron
binary is available in the shell search path, the same error as when attempting to run Holoscape in its development mode presents itself:While this may have been easier in an environment that is not based on NixOS, the path of least resistance for developers, which is to go from the NixOS-based Vagrant installation recommended on the Install documentation directly to the Holoscape application is clearly a rough experience and needs a lot of improvement to reduce these developer pain points.
@lucksus