From 81f2703470855435e149d46e894b4d632360d86f Mon Sep 17 00:00:00 2001 From: Suren K Date: Wed, 1 Oct 2025 17:29:32 -0500 Subject: [PATCH] fix: Remove old lock files to prevent npm build hanging - Add explicit removal of package-lock.json and yarn.lock in Dockerfile - Update .dockerignore to exclude lock files from build context - Prevents 'old lockfile' warnings that cause npm to hang - Forces npm to create fresh lock file with current version - Resolves build hanging during dependency resolution --- .dockerignore | 2 ++ Dockerfile | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.dockerignore b/.dockerignore index b0c745e9..cce7d3ac 100644 --- a/.dockerignore +++ b/.dockerignore @@ -26,6 +26,8 @@ yarn-debug.log* yarn-error.log* package-lock.json yarn.lock +**/package-lock.json +**/yarn.lock # Build artifacts target/ diff --git a/Dockerfile b/Dockerfile index 690b8257..a4f92892 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,9 @@ COPY examples/basicauthentication/pom.xml /app/pom.xml COPY examples/basicauthentication/src /app/src COPY examples/basicauthentication/ui.resources /app/ui.resources +# Remove old lock files to avoid npm warnings +RUN rm -f /app/ui.resources/package-lock.json /app/ui.resources/yarn.lock + # Build the Java application (skip frontend build for now) RUN mvn clean package -DskipTests