2024-11-27T16:13:38.995418484-08:00 [ERROR] Failed to install default prettier: prettier & plugins install: fetching latest npm versions: fetching latest npm version for package prettier-plugin-java: failed to execute npm info subcommand:
stdout: ""
stderr: "cannot execute /home/fmzakari/.local/share/zed/node/node-v22.5.1-linux-x64/bin/node: You are trying to run an unpatched binary on nixos, but you have not configured NIX_LD or NIX_LD_x86_64-linux. See https://github.com/Mic92/nix-ld for more details\n"
It basically works by allowing a custom LD_LIBRARY_PATH only for binaries built in the traditional model when run on NixOS.
Kind of like a global FHS on a NixOS system.
Anyways, I have NIX_LD set in my environment but i was surprised to see this message.
(NIX_LD has helped me get through a lot of similar issues on Visual Studio Code)
Check for existing issues
Describe the bug / provide steps to reproduce it
I have been playing with Zed and I noticed:
NIX_LD is this way to mock out a FHS on NixOS machines https://github.com/nix-community/nix-ld
It basically works by allowing a custom LD_LIBRARY_PATH only for binaries built in the traditional model when run on NixOS. Kind of like a global FHS on a NixOS system.
Anyways, I have NIX_LD set in my environment but i was surprised to see this message. (NIX_LD has helped me get through a lot of similar issues on Visual Studio Code)
Issue seems to be that the environment is cleared before the exec is called. https://github.com/zed-industries/zed/blob/main/crates/node_runtime/src/node_runtime.rs#L408
Environment
Zed: v0.162.5 (Zed) OS: Linux X11 nixos 24.05 Memory: 60.6 GiB Architecture: x86_64 GPU: AMD Radeon Graphics (RADV GFX1103_R1) || radv || Mesa 24.0.7
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log
``` ```Zed.log.txt