Skip to content

Commit 3591816

Browse files
authored
Merge pull request #174 from Lemoncode/fix/front-cd
fix copy
2 parents f98066f + 1dfa228 commit 3591816

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

front/Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ COPY package.json package-lock.json ./
1111
COPY front/package.json ./front/package.json
1212
COPY packages/db-model/package.json ./packages/db-model/package.json
1313

14-
# 2) Remove packageManager field to prevent Corepack (Node 22) from
15-
# hijacking yarn calls that Next.js SWC patching makes internally.
16-
RUN node -e "const p='package.json',j=JSON.parse(require('fs').readFileSync(p));delete j.packageManager;require('fs').writeFileSync(p,JSON.stringify(j,null,2))"
17-
18-
# 3) Install all dependencies for the monorepo (npm workspaces)
14+
# 2) Install all dependencies for the monorepo (npm workspaces)
1915
# We need dev deps here because Next build typically requires them.
2016
# --ignore-scripts: skip postinstall (env vars come from the cloud provider)
2117
RUN npm ci --ignore-scripts
2218

23-
# 4) Now copy the full source code
19+
# 3) Now copy the full source code
2420
COPY . .
2521

22+
# 4) Remove packageManager field to prevent Corepack (Node 22) from
23+
# hijacking yarn calls that Next.js SWC patching makes internally.
24+
# Must run AFTER "COPY . ." which overwrites the earlier package.json.
25+
RUN node -e "const p='package.json',j=JSON.parse(require('fs').readFileSync(p));delete j.packageManager;require('fs').writeFileSync(p,JSON.stringify(j,null,2))"
26+
2627
# 5) Build the internal dependency used by the front (db-model)
2728
# If your workspace name differs, adjust "-w db-model"
2829
RUN npm run -w db-model build --if-present

0 commit comments

Comments
 (0)