From fa99f6a2007189da3fe8af72db5c5a612aaad9a7 Mon Sep 17 00:00:00 2001 From: Asher Date: Fri, 19 Jan 2024 12:59:38 -0900 Subject: [PATCH] chore: make yarn use the right version of node (#11716) Otherwise if for example you try to run `yarn storybook` it complains that the version of Node is wrong. `pnpm storybook` works fine and that is probably what we should actually use, but as long as we are installing Yarn and not restricting its use we might as well make it use the right version of Node. --- flake.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index e7671015c7..f3322d9c77 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,8 @@ # Workaround for: terraform has an unfree license (‘bsl11’), refusing to evaluate. pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; formatter = pkgs.nixpkgs-fmt; + nodejs = pkgs.nodejs-18_x; + yarn = pkgs.yarn.override { inherit nodejs; }; # Check in https://search.nixos.org/packages to find new packages. # Use `nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update` # to update the lock file if packages are out-of-date. @@ -46,11 +48,11 @@ libuuid mockgen nfpm - nodejs-18_x - nodejs-18_x.pkgs.pnpm - nodejs-18_x.pkgs.prettier - nodejs-18_x.pkgs.typescript - nodejs-18_x.pkgs.typescript-language-server + nodejs + nodejs.pkgs.pnpm + nodejs.pkgs.prettier + nodejs.pkgs.typescript + nodejs.pkgs.typescript-language-server openssh openssl pango