From c60aa8b0ee044c1693407fa154329b32115cda83 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Tue, 5 Mar 2024 17:29:45 +0000 Subject: [PATCH] build: run prepare before install in Dockerfile (#2376) --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0f87cd851f..055c918a39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,10 @@ FROM base AS mud COPY . /app WORKDIR /app +# pnpm no longer runs prepare before the actual install (https://github.com/pnpm/pnpm/issues/3760) +# but we need to create some placeholder files like bins so that the install step can find them and put references to them in the right spot +# this resolves some chicken-and-egg problems with using workspace bins before they're created (install -> build -> install) +RUN pnpm recursive run prepare RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN pnpm run -r build