Skip to content

Commit 5161283

Browse files
committed
test(NODE-5606): use npm 9 on eol node versions
1 parent 7b98403 commit 5161283

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.evergreen/install-dependencies.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -o errexit # Exit the script with error if any of the commands fail
33

44
NODE_LTS_VERSION=${NODE_LTS_VERSION:-16}
5+
NODE_LOWEST_LTS=18
56

67
source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh"
78

@@ -96,7 +97,11 @@ fi
9697

9798
if [[ $operating_system != "win" ]]; then
9899
# Update npm to latest when we can
99-
npm install --global npm@latest
100+
if [[ $NODE_LTS_VERSION -lt $NODE_LOWEST_LTS ]]; then
101+
npm install --global npm@9
102+
else
103+
npm install --global npm@latest
104+
fi
100105
hash -r
101106
fi
102107

0 commit comments

Comments
 (0)