From 061c9ac64ab7e6dd071516a50d4416ce99b24a69 Mon Sep 17 00:00:00 2001 From: gkc Date: Mon, 14 Oct 2024 15:15:33 +0100 Subject: [PATCH 1/2] build: for the policy webapp: don't run `npm install -g npm@version` to choose the version of npm being used - just require that it be >= 10.8.2 --- .github/workflows/multibuild.yaml | 1 - apps/admin/webapp/package-lock.json | 4 ++-- apps/admin/webapp/package.json | 2 +- packages/dart/sshnoports/buildArchive | 1 - tools/multibuild/Dockerfile.package | 3 +-- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/multibuild.yaml b/.github/workflows/multibuild.yaml index 91ff9b665..a6682f97d 100644 --- a/.github/workflows/multibuild.yaml +++ b/.github/workflows/multibuild.yaml @@ -103,7 +103,6 @@ jobs: - name: build admin webapp working-directory: ./apps/admin/webapp run: | - npm install -g npm@10.8.2 npm ci npm run build - if: ${{ matrix.os != 'windows-latest' }} diff --git a/apps/admin/webapp/package-lock.json b/apps/admin/webapp/package-lock.json index 64b17136d..326b417e5 100644 --- a/apps/admin/webapp/package-lock.json +++ b/apps/admin/webapp/package-lock.json @@ -13,8 +13,8 @@ "vite": "5.4.6" }, "engines": { - "node": ">=v20.15.0 <23", - "npm": "10.8.2" + "node": ">=v20.15.0", + "npm": ">=10.8.2" } }, "node_modules/@ampproject/remapping": { diff --git a/apps/admin/webapp/package.json b/apps/admin/webapp/package.json index 90c98b4ba..aff46a6ee 100644 --- a/apps/admin/webapp/package.json +++ b/apps/admin/webapp/package.json @@ -15,6 +15,6 @@ }, "engines": { "node": ">=v20.15.0 <23", - "npm": "10.8.2" + "npm": ">=10.8.2" } } diff --git a/packages/dart/sshnoports/buildArchive b/packages/dart/sshnoports/buildArchive index 07ab4cd5d..9fc07cff7 100755 --- a/packages/dart/sshnoports/buildArchive +++ b/packages/dart/sshnoports/buildArchive @@ -38,7 +38,6 @@ echo "Compiling admin_api"; dart compile exe --verbosity error bin/np_admin.dart wait cd ../webapp || exit 1 echo "Building admin webapp" -npm install -g npm@10.8.2 || exit 1 npm ci || exit 1 npm run build || exit 1 diff --git a/tools/multibuild/Dockerfile.package b/tools/multibuild/Dockerfile.package index 238a94ab0..3417adcc0 100644 --- a/tools/multibuild/Dockerfile.package +++ b/tools/multibuild/Dockerfile.package @@ -9,8 +9,7 @@ WORKDIR /noports # install node for later (keep at the top file to increase cache hits) # hadolint ignore=DL3008 RUN apt-get update; \ - apt-get install -y --no-install-recommends npm; \ - npm install -g npm@10.8.2 + apt-get install -y --no-install-recommends npm COPY . . From dc4a6c87124457ef5074e7dfafa6cd5d588464d2 Mon Sep 17 00:00:00 2001 From: gkc Date: Mon, 14 Oct 2024 15:20:18 +0100 Subject: [PATCH 2/2] build: updated package-lock.json --- apps/admin/webapp/package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/admin/webapp/package-lock.json b/apps/admin/webapp/package-lock.json index 326b417e5..bc3b5c9b0 100644 --- a/apps/admin/webapp/package-lock.json +++ b/apps/admin/webapp/package-lock.json @@ -13,7 +13,7 @@ "vite": "5.4.6" }, "engines": { - "node": ">=v20.15.0", + "node": ">=v20.15.0 <23", "npm": ">=10.8.2" } },