Skip to content

fix: Version nodejs and yarn upgrade#768

Open
Kulichanin wants to merge 3 commits into
docker:masterfrom
Kulichanin:fix/vuejs
Open

fix: Version nodejs and yarn upgrade#768
Kulichanin wants to merge 3 commits into
docker:masterfrom
Kulichanin:fix/vuejs

Conversation

@Kulichanin

Copy link
Copy Markdown

Building vuejs/vuejs/Dockerfile fails with the following error:

21.66 error @inquirer/external-editor@1.0.3: The engine "node" is incompatible with this module. Expected version ">=18". Got "14.4.0"
21.67 info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
21.67 error Found incompatible module.
------
ERROR: failed to build: failed to solve: process "/bin/sh -c yarn global add @vue/cli" did not complete successfully: exit code: 1

After making the following changes to the Dockerfile, the build is successful:

# syntax=docker/dockerfile:1.4
# Fix nodejs version
FROM --platform=$BUILDPLATFORM node:18.20-alpine AS development

RUN mkdir /project
WORKDIR /project

COPY . .

RUN yarn global add @vue/cli
COPY .npmrc .
COPY .yarnrc.yml .
# Fix yarn version when building
RUN yarn upgrade && yarn install --immutable
ENV HOST=0.0.0.0
CMD ["yarn", "run", "serve"]

FROM development as dev-envs
RUN <<EOF
apk update
apk add git
EOF

RUN <<EOF
addgroup -S docker
adduser -S --shell /bin/bash --ingroup docker vscode
EOF
# install Docker tools (cli, buildx, compose)
COPY --from=gloursdocker/docker / /
CMD ["yarn", "run", "serve"]

securityeng-bot Bot and others added 3 commits June 18, 2026 11:47
Signed-off-by: Dmitry Kulikov <KulikovDV@proton.me>
Signed-off-by: Dmitry <112113425+Kulichanin@users.noreply.github.com>
Signed-off-by: Dmitry <112113425+Kulichanin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant