diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 909810b2cedc4d3507ed73b0528dbe79205146e6..3df1aac0130e7a32d768f59b0e62a2ae9ba1467a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -57,7 +57,7 @@ frontend test:
   stage: tests and linting
   script:
     - cd frontend
-    - npm install -g npm@latest
+    - npm install -g npm@9
     - npm ci
     - npm run coverage:ci
   coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
@@ -67,7 +67,7 @@ frontend lint:
   stage: tests and linting
   script:
     - cd frontend
-    - npm install -g npm@latest
+    - npm install -g npm@9
     - npm ci
     - npm run lint
 
@@ -76,7 +76,7 @@ frontend build:
   stage: tests and linting
   script:
     - cd frontend
-    - npm install -g npm@latest
+    - npm install -g npm@9
     - NODE_ENV=production
     - npm ci
     - npm run build:no-env
diff --git a/frontend/Containerfile b/frontend/Containerfile
index ac95ddb8e3067d9e834e37305bfbc76676e2174b..cb7e844b9fc141d5d952060b294b37500c758950 100644
--- a/frontend/Containerfile
+++ b/frontend/Containerfile
@@ -5,7 +5,7 @@ LABEL no.uio.contact="bnt-int@usit.uio.no"
 
 ### Build stage
 
-RUN npm install -g npm
+RUN npm install -g npm@9
 COPY . /app
 ENV NODE_ENV=production
 RUN cd /app/ && npm ci && npm run build:no-env