Skip to content

Commit d7b1beb

Browse files
authored
ci(NODE-5604): use npm 9 on eol node versions (#692)
1 parent 2587f04 commit d7b1beb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.evergreen/install-dependencies.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
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+
# npm version can be defined in the environment for cases where we need to install
6+
# a version lower than latest to support EOL Node versions.
7+
NPM_VERSION=${NPM_VERSION:-latest}
58

69
source "${PROJECT_DIRECTORY}/libmongocrypt/bindings/node/.evergreen/init-node-and-npm-env.sh"
710

@@ -94,8 +97,7 @@ else
9497
fi
9598

9699
if [[ $operating_system != "win" ]]; then
97-
# Update npm to latest when we can
98-
npm install --global npm@latest
100+
npm install --global npm@$NPM_VERSION
99101
hash -r
100102
fi
101103

0 commit comments

Comments
 (0)