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:
+5
-1
@@ -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 . .
|
||||||
|
|||||||
Reference in New Issue
Block a user