Commit 3c2c44f0 by zhangxingmin

push

parent 1340c6ff
FROM node:14-alpine AS builder
# 替换基础镜像为Node.js 16
FROM node:16-alpine AS builder
WORKDIR /app
......@@ -6,13 +7,11 @@ WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk add --no-cache python3 make g++
# 只复制package.json
# 复制修正后的package.json
COPY package.json ./
# 关键:强制刷新npm版本索引+延长超时时间(避免安装超时
# 重新安装依赖(使用官方源+适配Node.js 16
RUN npm config set registry https://registry.npmjs.org \
&& npm config set fetch-retry-mintimeout 60000 \
&& npm config set fetch-retry-maxtimeout 120000 \
&& npm cache clean --force \
&& npm install --legacy-peer-deps
......
......@@ -26,11 +26,9 @@
"echarts": "^5.4.1",
"js-sha256": "^0.11.1",
"nanoid": "^4.0.0",
"vue": "^2.6.14",
"@dcloudio/uni-app": "^3.0.0"
"vue": "^2.6.14"
},
"devDependencies": {
"@dcloudio/uni-h5": "^3.0.0",
"@dcloudio/uni-cli-service": "^3.0.0",
"@dcloudio/vue-cli-plugin-uni": "^3.0.0",
"less": "^4.3.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment