From 9fc29c397982b692f8572df85893e5ef9f1707f9 Mon Sep 17 00:00:00 2001 From: Clodes Fernando Date: Wed, 13 Mar 2024 18:37:36 -0300 Subject: [PATCH] Adjust incognia.Dockerfile to set a working yarn version The "yarn set version berry" downloads the yarn version 4, but it is not compatible with the node version currently used in this project. Note that the yarn v3 is being used, because the yarn v2 is downloading the workspace-tools using the wrong URL, so it would break the build. --- incognia.Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/incognia.Dockerfile b/incognia.Dockerfile index f870d429a9178..a6c675e9e34b6 100644 --- a/incognia.Dockerfile +++ b/incognia.Dockerfile @@ -24,8 +24,12 @@ COPY packages/cubejs-server-core/package.json packages/cubejs-server-core/packag FROM base AS prod_deps -# Use yarn v2 because of https://github.com/yarnpkg/yarn/issues/6323 -RUN yarn set version berry +# Use yarn v2+ because of https://github.com/yarnpkg/yarn/issues/6323 +# The yarn versions prior to 1.22.20 have a bug that it always download +# the latest release, so first we manually go to the 4.1.1 before going +# to the target version. +RUN YARN_IGNORE_NODE=1 yarn set version 4.1.1 +RUN YARN_IGNORE_NODE=1 yarn set version 3.8.1 RUN yarn plugin import workspace-tools RUN yarn config set nodeLinker node-modules RUN yarn workspaces focus --production --all