fix: Add --ignore-scripts to prevent canvas native build in frontend

The trianglify package depends on canvas, which tries to build native binaries
requiring Python and build tools. Since canvas is not actually needed for the
browser build (trianglify uses it only server-side), we can skip all install
scripts with --ignore-scripts to avoid the build failure.

This fixes the ARM64 and AMD64 frontend builds.
This commit is contained in:
Muhammad Ibrahim
2025-10-28 16:51:39 +00:00
parent 12eef22912
commit 42f4e58bb4

View File

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