Error installing nodejs hooks with pre-commit

If using NixOS, just add this module and get a working pre-commit installation that can actually download, install and run prettier. Of course, it’s worse than a fully-nix-based solution, but it’s useful if you need to contribute to projects that require pretiter but don’t know about nix:

{
  programs.nix-ld.enable = true;
  environment.systemPackages = with pkgs; [pre-commit];
}

If using Nix to install pre-commit on a non-NixOS system, you can probably get the same behavior with some creative use of GitHub - Mic92/nix-ld: Run unpatched dynamic binaries on NixOS.