From f3961867b05a304cea32d18b07813418805c407f Mon Sep 17 00:00:00 2001 From: Felddy Date: Tue, 26 Sep 2023 13:59:29 -0400 Subject: [PATCH] Add diagnostic output around npm calls --- Dockerfile | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 89b44c768..edd79ef8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,9 +14,31 @@ 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 npm executable +RUN which npm + +# Use the file command to inspect the npm binary +RUN file $(which npm) + +# Follow the symbolic link and use the file command on the target +RUN file $(readlink -f $(which npm)) + +# Print the version of npm +RUN 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