I’m wondering if this
ENOENT errors is the same
file not found error as when running non-nix binaries that can not find lib files or similar.
This is how I normally run my electron app:
$ npm install ... $ npm run build ... $ ./node_modules/.bin/electron ./dist/main/entry.js events.js:187 throw er; // Unhandled 'error' event ^ Error: spawn /home/trusktr/src/velodyne_sw+mapper-replay/node_modules/electron/dist/electron ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) at onErrorNT (internal/child_process.js:456:16) ...
Looks like the same issues:
- Flow 0.38.0 doesn't work on Linux (NixOS) · Issue #62 · flowtype/flow-bin · GitHub
As a newb to NixOS, as much as I love the concept, it seems like a pain when it comes to working on project like mine, that depend on native binaries installed in the project with
The binary in particular is at
./node_modules/electron/dist/electron, and starts with
I have a bunch of projects cloned locally that I want to work on now that I’ve moved to NixOS. Each one of them may use a different version of
electron that was locally installed with
I wonder how to work with projects like these, without changing the workflows in Traditional Linux or macOS, yet still be able to work on them in NixOS.
Even if I were to put
electron in my PATH, built with nix, the
npm commands place
./node_modules/.bin at the beginning of
PATH so the commands will still use the
electron that is locally installed and not patched.
Hmmmm , maybe in the NixOS cases, I simply need to delete the locally-installed
electron, then build the one I want and enter nix-shell, so that it is in PATH and not overridden by the local one. I wonder if
node2nix takes care of most of this.
Or maybe I need to make tooling that patches the local binaries just in the NixOS case, calling