为什么 docker-compose up 说找不到 zingchart 和 multiselect 的依赖项?

Why does docker-compose up say it can't find dependencies for zingchart and multiselect?

如果有人对此有解决方案,我将不胜感激,因为我已经挠头好几个星期了..

问题来了:我有一个 Vue 应用程序,它使用 ZingChart-Vue and Vue-Multiselect. When i do npm run serve it perfectly serves, at port 8080. When I do npm run build, it perfectly builds. However, when I do docker-compose up, these two things (ZingChart-Vue and Vue-Multiselect) 搞砸了。

这是错误:https://i.stack.imgur.com/tOXgk.png

此应用程序旨在用于使用 github 操作的 CI/CD 管道,但当然它也会给出错误:https://i.stack.imgur.com/PFAQK.png

这是 package.json 文件:https://www.codepile.net/pile/QeboY1mw

这里是包-lock.json文件:https://www.codepile.net/pile/NDGRXY90

这是 docker 文件:

FROM node:12-alpine as application_modules

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install

# Test and lint and Prod build
FROM node:12-alpine as prod_build

WORKDIR /usr/src/app

COPY . . 

COPY --from=application_modules /usr/src/app/node_modules ./node_modules

RUN npm test && npm run lint && npm run build

# Install Server dependencies
FROM node:12-alpine as server_modules

WORKDIR /usr/src/app

COPY container-package.json ./package.json

RUN npm install

# Start Server
FROM node:12-alpine

WORKDIR /usr/src/app

COPY --from=prod_build /usr/src/app/dist ./dist

COPY --from=server_modules /usr/src/app/node_modules ./node_modules

COPY server.js ./

COPY container-package.json ./package.json

ENV PORT=8080

EXPOSE 8080

CMD ["npm", "start"]

我找到了答案 - 确保在管道上安装 Git(最好在安装节点后立即安装!)