fix: Add npm fetch retries to handle transient network errors

ARM64 builds under QEMU are slower and more prone to network timeouts.
Changed from --fetch-retries=0 to --fetch-retries=3 with exponential backoff:
- Min timeout: 20 seconds
- Max timeout: 120 seconds

This should handle transient ECONNRESET errors from npm registry.
This commit is contained in:
Muhammad Ibrahim
2025-10-28 17:10:45 +00:00
parent 3df2057f7e
commit 8864de6c15
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ COPY frontend/package*.json ./
RUN npm cache clean --force &&\
rm -rf node_modules ~/.npm /root/.npm &&\
npm install --ignore-scripts --legacy-peer-deps --no-audit --prefer-online --fetch-retries=0
npm install --ignore-scripts --legacy-peer-deps --no-audit --prefer-online --fetch-retries=3 --fetch-retry-mintimeout=20000 --fetch-retry-maxtimeout=120000
COPY frontend/ ./