k-l-lambda Claude commited on
Commit
426c756
·
1 Parent(s): 8503c2c

Add more debugging for backend npm install

Browse files

- Explicitly create backend directory
- Show full npm install output
- Add explicit error message on failure

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +13 -7
Dockerfile CHANGED
@@ -2,11 +2,14 @@ FROM node:20-slim
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
- # Build timestamp: 2026-01-13T00:00
6
 
7
  # Minimal test - just check if files exist
8
  WORKDIR /app
9
 
 
 
 
10
  # Test COPY commands one by one
11
  RUN echo "Step 1: Working directory set"
12
 
@@ -14,19 +17,22 @@ COPY trigo-web/package.json ./package.json
14
  RUN echo "Step 2: Root package.json copied" && cat package.json | head -5
15
 
16
  COPY trigo-web/backend/package.json ./backend/package.json
17
- RUN echo "Step 3: Backend package.json copied" && cat backend/package.json | head -5
18
 
19
  # Install only esbuild (smaller than yarn)
20
  RUN npm install -g esbuild
21
  RUN echo "Step 4: esbuild installed"
22
 
23
- # Install root deps
24
- RUN npm install --omit=dev --legacy-peer-deps
25
  RUN echo "Step 5: Root deps installed"
26
 
27
- # Install backend deps
28
- RUN cd backend && npm install --omit=dev --legacy-peer-deps
29
- RUN echo "Step 6: Backend deps installed"
 
 
 
30
 
31
  # Copy backend source
32
  COPY trigo-web/backend/src/ ./backend/src/
 
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # Build timestamp: 2026-01-13T00:10
6
 
7
  # Minimal test - just check if files exist
8
  WORKDIR /app
9
 
10
+ # Create directories explicitly
11
+ RUN mkdir -p backend
12
+
13
  # Test COPY commands one by one
14
  RUN echo "Step 1: Working directory set"
15
 
 
17
  RUN echo "Step 2: Root package.json copied" && cat package.json | head -5
18
 
19
  COPY trigo-web/backend/package.json ./backend/package.json
20
+ RUN echo "Step 3: Backend package.json copied" && ls -la backend/ && cat backend/package.json | head -10
21
 
22
  # Install only esbuild (smaller than yarn)
23
  RUN npm install -g esbuild
24
  RUN echo "Step 4: esbuild installed"
25
 
26
+ # Install root deps - this is simple, only dotenv
27
+ RUN npm install --omit=dev
28
  RUN echo "Step 5: Root deps installed"
29
 
30
+ # Install backend deps - show full output
31
+ RUN echo "Step 6: Starting backend npm install..." && \
32
+ cd backend && \
33
+ npm install --omit=dev 2>&1 && \
34
+ echo "Step 6: Backend deps installed successfully" || \
35
+ (echo "Step 6: Backend npm install FAILED" && exit 1)
36
 
37
  # Copy backend source
38
  COPY trigo-web/backend/src/ ./backend/src/