From 7066f62942a3f290f10f282a89cae0efbfe684d1 Mon Sep 17 00:00:00 2001 From: guoyangzhen Date: Sat, 14 Mar 2026 16:41:21 +0800 Subject: [PATCH] fix(frontend): ensure react-scripts is available in Docker container Use npm ci + npm rebuild for deterministic installs. Add verification step that catches missing react-scripts early. Fixes #411 --- frontend/Dockerfile.frontend | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/Dockerfile.frontend b/frontend/Dockerfile.frontend index 8bf7845..372c38f 100644 --- a/frontend/Dockerfile.frontend +++ b/frontend/Dockerfile.frontend @@ -2,15 +2,18 @@ FROM node:18 WORKDIR /app -# Install dependencies +# Copy package files COPY agentic-seek-front/package.json agentic-seek-front/package-lock.json ./ -RUN npm install + +# Install dependencies with explicit bin linking +RUN npm ci && npm rebuild # Copy application code COPY agentic-seek-front/ . -# Expose port +# Verify react-scripts is available (catches install issues early) +RUN test -f node_modules/.bin/react-scripts || npm install react-scripts + EXPOSE 3000 -# Run the application -CMD ["npm", "start"] \ No newline at end of file +CMD ["npm", "start"]