Skip to content

Vuejs app build fails with error #767

Description

@Kulichanin

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

When you fix the Dockerfile file, everything starts building:

# Update 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 .

# Update 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"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions