Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Install latest npm when building - #4035

Merged
AbhitejJohn merged 4 commits into
dotnet:mainfrom
JoeRobich:dev/jorobich/install-latest-npm
Sep 9, 2025
Merged

Install latest npm when building#4035
AbhitejJohn merged 4 commits into
dotnet:mainfrom
JoeRobich:dev/jorobich/install-latest-npm

Conversation

@JoeRobich

@JoeRobich JoeRobich commented Sep 8, 2025

Copy link
Copy Markdown
Member

11.6.0 contains a fix for npm/cli#8468

Comment thread eng/templates/build-and-test-tasks.yml Outdated
- script: npm install -g npm@11.4.1
displayName: Downgrade npm to v11.4.1
- script: npm install -g npm
displayName: Install latest npm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I tend to prefer installing a specific version. If a new version comes out and something in our build breaks as a result, it won't be obvious what changed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Updated. Looking at the dotnet-public-npm feed the 11.4.1 version I was previously downgrading to was not part of the feed, perhaps that is why we were still seeing the error despite downgrading. I made sure 11.6.0 was pushed to the feed.

@AbhitejJohn
AbhitejJohn merged commit a4ffb59 into dotnet:main Sep 9, 2025
4 checks passed
@alexsch01

Copy link
Copy Markdown

NodeJS 22.21.0 and greater / NodeJS 24.8.0 and greater
include npm versions without the bug @JoeRobich

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants