From 6408b916ba788d5870512683c9526c62e2349ea1 Mon Sep 17 00:00:00 2001 From: Felddy Date: Tue, 26 Sep 2023 15:53:16 -0400 Subject: [PATCH] Add diagnostic output around npm calls --- Dockerfile | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 89b44c768..aa75d6f0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,9 +14,34 @@ COPY \ package-lock.json \ tsconfig.json \ ./ -RUN \ - npm install --loglevel verbose && \ - npm install --loglevel verbose --global typescript + +# Install the file command +RUN apk add --no-cache file + +# Check the path to the node executable +RUN which node + +# Use the file command to inspect the npm binary +RUN file $(which node) + +# Use ldd to inspect the node binary +RUN ldd $(which node) + +# Print the version of node +RUN node -v + +# Print the version of npm (this hangs on s390x) +RUN NODE_DEBUG=* node $(which npm) -v + +# List all npm configurations +RUN npm config ls -l + +# Run npm install with verbose logging +RUN npm install --loglevel verbose + +# Install typescript globally with verbose logging +RUN npm install --global typescript --loglevel verbose + COPY /src/*.ts src/ RUN tsc RUN grep -l "#!" dist/*.js | xargs chmod a+x