Dockerfile: Add --force to bypass platform check

npm ci fails with EBADPLATFORM when lockfile contains darwin-only
packages (fsevents), even with --omit=optional. The --force flag
bypasses this check.
This commit is contained in:
Ben West
2026-03-01 12:53:32 -08:00
parent ee2bfa4fe7
commit aa13913093
+1 -1
View File
@@ -8,7 +8,7 @@ ADD . /opt/app
# TODO: We should be able to do `RUN npm install --only=production`.
# For this to work, we need to copy only package.json and things needed for `npm`'s to succeed.
# TODO: Do we need to re-add `npm audit fix`? Or should that be part of a development process/stage?
RUN npm ci --cache /tmp/empty-cache --omit=optional && \
RUN npm ci --cache /tmp/empty-cache --omit=optional --force && \
npm run postinstall && \
npm run env && \
rm -rf /tmp/*