Skip to content

Commit fa99f6a

Browse files
authored
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.
1 parent 76911f1 commit fa99f6a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

flake.nix

+7-5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# Workaround for: terraform has an unfree license (‘bsl11’), refusing to evaluate.
1414
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
1515
formatter = pkgs.nixpkgs-fmt;
16+
nodejs = pkgs.nodejs-18_x;
17+
yarn = pkgs.yarn.override { inherit nodejs; };
1618
# Check in https://search.nixos.org/packages to find new packages.
1719
# Use `nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update`
1820
# to update the lock file if packages are out-of-date.
@@ -46,11 +48,11 @@
4648
libuuid
4749
mockgen
4850
nfpm
49-
nodejs-18_x
50-
nodejs-18_x.pkgs.pnpm
51-
nodejs-18_x.pkgs.prettier
52-
nodejs-18_x.pkgs.typescript
53-
nodejs-18_x.pkgs.typescript-language-server
51+
nodejs
52+
nodejs.pkgs.pnpm
53+
nodejs.pkgs.prettier
54+
nodejs.pkgs.typescript
55+
nodejs.pkgs.typescript-language-server
5456
openssh
5557
openssl
5658
pango

0 commit comments

Comments
 (0)