Bust npm ci cache, add post-install next verification
deploy / deploy (push) Failing after 1m17s

The npm ci layer was cached with a broken result (node_modules/next missing).
Changing the RUN command text invalidates that cache entry and forces a fresh
install. The added post-install check will show the exact npm ci error if next
is still missing, instead of failing silently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-05-31 15:43:19 +03:30
parent 213a9d4f1c
commit bcea9dc2f6
+5 -1
View File
@@ -16,7 +16,11 @@ COPY package.json package-lock.json .npmrc ./
RUN if [ -n "$NPM_TOKEN" ]; then \ RUN if [ -n "$NPM_TOKEN" ]; then \
echo "//mirror.soroushasadi.com/repository/npm-group/:_authToken=${NPM_TOKEN}" >> .npmrc ; \ echo "//mirror.soroushasadi.com/repository/npm-group/:_authToken=${NPM_TOKEN}" >> .npmrc ; \
fi \ fi \
&& npm ci && npm ci \
&& echo "=== post-install check ===" \
&& (test -d node_modules/next \
&& echo "OK: node_modules/next found: $(cat node_modules/next/package.json | grep '\"version\"' | head -1)" \
|| (echo "FATAL: node_modules/next is missing after npm ci" && exit 1))
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1
COPY . . COPY . .