Skip to content

ci(NODE-7496): pin npm to 11.11.1 for Node 22 build variants#4908

Merged
PavelSafronov merged 9 commits intomainfrom
NODE-7496
Mar 30, 2026
Merged

ci(NODE-7496): pin npm to 11.11.1 for Node 22 build variants#4908
PavelSafronov merged 9 commits intomainfrom
NODE-7496

Conversation

@tadjik1
Copy link
Copy Markdown
Member

@tadjik1 tadjik1 commented Mar 26, 2026

Description

Summary of Changes

Override NPM_VERSION for all tasks using Node.js v22 to avoid failures on npm install -g npm@latest.

Notes for Reviewers

This problem can easily be reproduced locally by installing Node.js v22 and then try to upgrate npm to latest using bundled version (this is what evergreen tools do):

➜  dbx nvm install 22
v22.22.2 is already installed.
Now using node v22.22.2 (npm v10.9.7)
➜  dbx npm install -g npm@latest
npm error code MODULE_NOT_FOUND
npm error Cannot find module 'promise-retry'
npm error Require stack:
...

This only reproduced on Node.js v22 (and bundled npm version 10.9.7). Node.js v20.19.0, as well as 24 - upgrades npm as expected.

What is the motivation for this change?

Release Highlight

Release notes highlight

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@tadjik1 tadjik1 changed the title ci(NODE-7496): pin npm to 11.11.1 for Node 20 and 22 build variants ci(NODE-7496): pin npm to 11.11.1 for Node 22 build variants Mar 26, 2026
@tadjik1 tadjik1 marked this pull request as ready for review March 26, 2026 14:31
@tadjik1 tadjik1 requested a review from a team as a code owner March 26, 2026 14:31
Copilot AI review requested due to automatic review settings March 26, 2026 14:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins npm for Node.js v22 Evergreen executions to avoid failures when upgrading npm from the bundled Node 22 npm (v10.9.7) during dependency installation.

Changes:

  • Add NPM_VERSION=11.11.1 expansion to generated Node 22 buildvariants.
  • Override install dependencies for the Node 22 unit-test task to pass NPM_VERSION=11.11.1.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.evergreen/generate_evergreen_tasks.js Adds logic to pin npm for Node 22 buildvariants and the Node 22 unit-test task.
.evergreen/config.yml Updates the generated Evergreen config to include the npm pin in Node 22 task/variant definitions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@PavelSafronov PavelSafronov self-assigned this Mar 26, 2026
@PavelSafronov PavelSafronov added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Mar 26, 2026
Copy link
Copy Markdown
Contributor

@PavelSafronov PavelSafronov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add a TODO JIRA item for unpinning this.

@tadjik1 tadjik1 requested a review from PavelSafronov March 27, 2026 09:01
@tadjik1 tadjik1 requested a review from PavelSafronov March 27, 2026 15:54
@PavelSafronov PavelSafronov merged commit e4909bd into main Mar 30, 2026
28 of 32 checks passed
@PavelSafronov PavelSafronov deleted the NODE-7496 branch March 30, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Primary Review In Review with primary reviewer, not yet ready for team's eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants