Skip to content

Commit 889c994

Browse files
authored
ci(NODE-5032): fix windows node 18.14.0 npm version issue (#3554)
1 parent 6a6dde1 commit 889c994

File tree

4 files changed

+3
-26
lines changed

4 files changed

+3
-26
lines changed

.evergreen/config.in.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ functions:
375375
working_dir: "src"
376376
script: |
377377
${PREPARE_SHELL}
378-
NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} NPM_OPTIONS=${NPM_OPTIONS}\
378+
NODE_LTS_NAME=${NODE_LTS_NAME} NPM_OPTIONS=${NPM_OPTIONS}\
379379
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
380380
- command: expansions.update
381381
params:

.evergreen/config.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ functions:
334334
working_dir: src
335335
script: |
336336
${PREPARE_SHELL}
337-
NODE_LTS_NAME=${NODE_LTS_NAME} MSVS_VERSION=${MSVS_VERSION} NPM_OPTIONS=${NPM_OPTIONS}\
337+
NODE_LTS_NAME=${NODE_LTS_NAME} NPM_OPTIONS=${NPM_OPTIONS}\
338338
bash ${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh
339339
- command: expansions.update
340340
params:
@@ -2830,7 +2830,6 @@ buildvariants:
28302830
run_on: windows-64-vs2019-large
28312831
expansions:
28322832
NODE_LTS_NAME: fermium
2833-
MSVS_VERSION: 2019
28342833
tasks:
28352834
- test-latest-server
28362835
- test-latest-replica_set
@@ -2872,7 +2871,6 @@ buildvariants:
28722871
run_on: windows-64-vs2019-large
28732872
expansions:
28742873
NODE_LTS_NAME: gallium
2875-
MSVS_VERSION: 2019
28762874
tasks:
28772875
- test-latest-server
28782876
- test-latest-replica_set
@@ -2912,7 +2910,6 @@ buildvariants:
29122910
run_on: windows-64-vs2019-large
29132911
expansions:
29142912
NODE_LTS_NAME: hydrogen
2915-
MSVS_VERSION: 2019
29162913
tasks:
29172914
- test-latest-server
29182915
- test-latest-replica_set

.evergreen/generate_evergreen_tasks.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const OPERATING_SYSTEMS = [
2828
name: 'windows-64-vs2019',
2929
display_name: 'Windows (VS2019)',
3030
run_on: 'windows-64-vs2019-large',
31-
msvsVersion: 2019,
3231
clientEncryption: false // TODO(NODE-3401): Unskip when Windows no longer fails to launch mongocryptd occasionally
3332
}
3433
].map(osConfig => ({
@@ -395,7 +394,6 @@ for (const
395394
run_on,
396395
nodeVersions = NODE_VERSIONS,
397396
clientEncryption,
398-
msvsVersion
399397
} of OPERATING_SYSTEMS) {
400398
const testedNodeVersions = NODE_VERSIONS.filter(version => nodeVersions.includes(version));
401399
const os = osName.split('-')[0];
@@ -418,9 +416,6 @@ for (const
418416
if (clientEncryption) {
419417
expansions.CLIENT_ENCRYPTION = true;
420418
}
421-
if (msvsVersion) {
422-
expansions.MSVS_VERSION = msvsVersion;
423-
}
424419

425420
BUILD_VARIANTS.push({ name, display_name, run_on, expansions, tasks: taskNames });
426421
};

.evergreen/install-dependencies.sh

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,14 @@ NVM_WINDOWS_URL="https://github.com/coreybutler/nvm-windows/releases/download/1.
55
NVM_URL="https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh"
66

77
NODE_LTS_NAME=${NODE_LTS_NAME:-fermium}
8-
MSVS_VERSION=${MSVS_VERSION:-2019}
98
NODE_ARTIFACTS_PATH="${PROJECT_DIRECTORY}/node-artifacts"
10-
NPM_CACHE_DIR="${NODE_ARTIFACTS_PATH}/npm"
11-
NPM_TMP_DIR="${NODE_ARTIFACTS_PATH}/tmp"
129

1310
# this needs to be explicitly exported for the nvm install below
1411
export NVM_DIR="${NODE_ARTIFACTS_PATH}/nvm"
1512
export XDG_CONFIG_HOME=${NODE_ARTIFACTS_PATH}
1613

1714
# create node artifacts path if needed
18-
mkdir -p ${NODE_ARTIFACTS_PATH}
19-
mkdir -p ${NPM_CACHE_DIR}
20-
mkdir -p "${NPM_TMP_DIR}"
15+
mkdir -p "${NODE_ARTIFACTS_PATH}"
2116

2217
function node_lts_to_version() {
2318
case $1 in
@@ -99,22 +94,12 @@ EOT
9994
which node || echo "node not found, PATH=$PATH"
10095
which npm || echo "npm not found, PATH=$PATH"
10196
npm cache clear --force # Fixes: Cannot read properties of null (reading 'pickAlgorithm') error on windows
102-
npm config set msvs_version ${MSVS_VERSION}
103-
npm config set scripts-prepend-node-path true
10497

10598
# install Node.js on Linux/MacOS
10699
else
107100
curl -o- $NVM_URL | bash
108101
[ -s "${NVM_DIR}/nvm.sh" ] && source "${NVM_DIR}/nvm.sh"
109102
nvm install --no-progress "$NODE_VERSION"
110-
111-
# setup npm cache in a local directory
112-
cat <<EOT > .npmrc
113-
devdir=${NPM_CACHE_DIR}/.node-gyp
114-
init-module=${NPM_CACHE_DIR}/.npm-init.js
115-
cache=${NPM_CACHE_DIR}
116-
tmp=${NPM_TMP_DIR}
117-
EOT
118103
fi
119104

120105
npm install ${NPM_OPTIONS}

0 commit comments

Comments
 (0)