Add yarn command so corepack sets up yarn
For who knows what reason, yarn install by itself doesn't seem to
trigger corepack, so we need to add a yarn --version in front. Otherwise
you end up with patch errors around hunks being applied because of a
yarn version mismatch.
@@ -30,7 +30,8 @@ build-env-image:
# This will run every time, because all PHONYs (e.g. build-env-image) run every time.
node_modules: build-env-image package.json yarn.lock
- $(DOCKER_RUN) yarn install
+ # The yarn --version is REQUIRED in order for corepack to set up the right yarn version. Do NOT delete it.
+ $(DOCKER_RUN) yarn --version && yarn install
build: node_modules $(ASSET_DIRS) $(ASSET_FILES)
$(DOCKER_RUN) yarn build
