Debug next not found: add diagnostic + use direct node invocation
deploy / deploy (push) Failing after 1s
deploy / deploy (push) Failing after 1s
Replace `npm run build` with `node node_modules/next/dist/bin/next build` to bypass PATH/symlink resolution issues on Alpine. Also adds a diagnostic `ls node_modules/.bin/next` so CI logs show whether the binary is present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -20,7 +20,10 @@ RUN if [ -n "$NPM_TOKEN" ]; then \
|
|||||||
|
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
# Diagnose what's in .bin after install, then invoke next directly via node
|
||||||
|
# to bypass any PATH / symlink resolution issues with `npm run`.
|
||||||
|
RUN ls node_modules/.bin/next 2>&1 || echo "WARN: next not in .bin" ; \
|
||||||
|
node node_modules/next/dist/bin/next build
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# 2. Runner — minimal image. Standalone server + static assets only.
|
# 2. Runner — minimal image. Standalone server + static assets only.
|
||||||
|
|||||||
Reference in New Issue
Block a user