When you use
yarn inside of a nix-shell, you need to pin it to the associated
nodejs version you’re planning on using, otherwise it uses the default of the nix pkgs.
Here’s an article that I used to find a good example of it.
shell.nix for using
nodejs-16_x ended up being: