docker icon indicating copy to clipboard operation
docker copied to clipboard

Docker build fails due to missing Yarn – fixed with corepack enable && corepack install -g yarn

Open vilanell000 opened this issue 5 months ago • 0 comments

When building the development environment using the instructions from the documentation, docker compose up --watch the Docker build fails with: failed to solve: process "/bin/sh -c wget -O- https://deb.nodesource.com/setup_22.x | bash - apt update && apt install --no-install-recommends -y git vim nodejs sassc && apt-get clean && rm -rf /var/lib/apt/lists/* && ln -s /usr/bin/yarnpkg /usr/bin/yarn && ln -s /usr/bin/sassc /usr/bin/sass" did not complete successfully: exit code: 126

So,I modified the Dockerfile and broke the single RUN command into more, failds with: failed to solve: process "/bin/sh -c yarn install:force" did not complete successfully: exit code: 127

after edit the file a few times, I fixed it after enable Corepack to install Yarn.

the difference between modification : https://www.diffchecker.com/5IVRYTiO/

vilanell000 avatar Aug 10 '25 07:08 vilanell000