-
Notifications
You must be signed in to change notification settings - Fork 849
ci(deploy): install npm version 11 #4951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the CI deployment workflow to install npm version 11, which is required for OIDC publishing support (npm ≥11.5.1). The change addresses a deployment failure caused by Node 22's default npm@10 being incompatible with OIDC publishing requirements.
- Adds a new step to install npm@11 globally before project dependencies
- Applies the npm installation step to both the
deploy-nextandprod-deployjobs using YAML anchors
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cache: npm | ||
| - &install-npm | ||
| name: Install npm | ||
| run: npm install -g npm@11 |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version specifier npm@11 installs the latest npm 11.x version, which could lead to non-deterministic builds if future npm 11.x releases introduce changes. Consider pinning to a specific version like [email protected] (the minimum required version mentioned in the PR description) or a more specific version range to ensure reproducible builds.
| run: npm install -g npm@11 | |
| run: npm install -g npm@11.5.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm itself is pretty good with backwards compatibility. We could pin, but is it really providing us much value since this is temporary until we upgrade to node 24 anyways? At that point the 11 series npm will be the default and we won't need step at all anymore. And, it will be doing exactly what this step is doing. Using the latest version attached to our 24 version.
straker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to say we update our .nvm file to use node 24. It only enforces the development version of node so if we need node 24 to publish then we should update to it.
I agree that I prefer keeping development/testing/publishing on the same versions of package management if possible, and the easiest way to encourage that for local development is to use That said, if you encounter any issues at all with bumping .nvmrc to 24, I'm also fine with installing npm 11 separately in the short term to get OIDC publishing unblocked. |
The other part that I forgot with deploy. We run on Node 22 by the
.nvmrcversion, which uses npm@10 as the default version. To use OIDC publishing at all, npm must be at 11.5.1 or higher. So dual combo of the token being off before combined with this version issue is why deployment was failing.Closes: #4912