From 02e96210cec4cb7e141a87f88e32f4ec3688d3d7 Mon Sep 17 00:00:00 2001 From: Liad Yosef Date: Tue, 15 Oct 2024 12:57:06 +0300 Subject: [PATCH] fix(server): upgrade Node version to 20 (#6531) **Problem:** Today our server Node version was 18, which was no longer LTS and even broke some of the modern projects' dependencies. image **Fix:** Upgrade the server Node version to 20. ![image](https://github.com/user-attachments/assets/649d7b4d-4e47-4bc6-a830-ff6578974511) **Manual Tests:** I hereby swear that: - [X] I opened a hydrogen project and it loaded - [X] I could navigate to various routes in Play mode --- server/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/default.nix b/server/default.nix index 7d6d520d8490..315bc308a9ca 100644 --- a/server/default.nix +++ b/server/default.nix @@ -1,13 +1,17 @@ let release = (import ../release.nix {}); pkgs = release.pkgs; + recentPkgs = release.recentPkgs; + # we set only the running Node to be 20.x, for project dependencies + node = recentPkgs.nodejs_20; + yarn = recentPkgs.yarn.override { nodejs = node; }; compiler = "ghc902"; utopia-server = pkgs.haskell.packages.${compiler}.callCabal2nix "utopia-server" ./. {}; haskell = pkgs.haskell.lib; trivial = pkgs.lib.trivial; disableProfiling = pkg: haskell.disableLibraryProfiling (haskell.disableExecutableProfiling pkg); disableExternalTests = pkg: haskell.appendConfigureFlag pkg "--flags -enable-external-tests"; - withNodeTooling = pkg: haskell.addBuildTools pkg [pkgs.nodejs pkgs.yarn]; + withNodeTooling = pkg: haskell.addBuildTools pkg [node yarn]; serverModifications = pkg: trivial.pipe pkg [disableProfiling disableExternalTests withNodeTooling]; overriddenHaskellPackages = pkgs.haskell.packages.${compiler}.override { overrides = self: super: {