报错如下:
vue-element-admin@4.3.1 build:prod
vue-cli-service build
These dependencies were not found:
To install them, you can run: npm install --save node:buffer node:http node:https node:net node:stream node:url node:util node:zlib
The command '/bin/sh -c cnpm run build:prod' returned a non-zero code: 1
ERROR: Service 'web' failed to build : Build failed
docker文件配置如下:
FROM node:16.0.0 as build-stage
WORKDIR /app
ADD . /app/
RUN npm install npm@8.1.2 -g
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org/
RUN cnpm install
RUN cnpm install --save core-js
RUN cnpm install -g node-fetch@3
RUN cnpm run build:prod
看看 dockerfile