Skip to content
Discussion options

You must be logged in to vote

Hello! Thanks for asking this question. I did some poking around and was able to reproduce your issue and also figure out a working fix for you.

The DHI node images set YARN_DISABLE_SELF_UPDATE_CHECK=true as you obvserved, which is a Yarn v1 config that conflicts with Yarn v4. Unset this variable before running yarn commands and your issue should be resolved:

FROM dhi.io/node:20-alpine3.23-dev AS build-stage
...
# Unset once, chain multiple yarn commands
RUN unset YARN_DISABLE_SELF_UPDATE_CHECK && \
    yarn install && \
    yarn add some-package && \
    yarn --version

And here is a one-shot script so you can easily see this in action:

mkdir dhi-yarn-test && cd dhi-yarn-test

cat > Docke…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by a-dubs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants