From 41f1810e52385bf3cf72d193dfb6eb32738c5588 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 17 Feb 2023 09:54:53 -0800 Subject: [PATCH] Clean the npm cache before running install --- .github/workflows/script/check-node-modules.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/script/check-node-modules.sh b/.github/workflows/script/check-node-modules.sh index a817f5f0fa..9178536304 100755 --- a/.github/workflows/script/check-node-modules.sh +++ b/.github/workflows/script/check-node-modules.sh @@ -10,6 +10,10 @@ fi # When updating this, make sure to update the npm version in # `.github/workflows/update-dependencies.yml` too. sudo npm install --force -g npm@9.2.0 + +# clean the npm cache to ensure we don't have any files owned by root +sudo npm cache clean --force + # Reinstall modules and then clean to remove absolute paths # Use 'npm ci' instead of 'npm install' as this is intended to be reproducible npm ci