actions / actions/setup-node

Set npm/yarn/pnpm version

Open
#529 8 comments 60 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
5k
Forks
1.7k
Avg merge
3d 12h
Merged PRs (30d)
2

Description

Description:
Similar to how we can set the node version I'd like to set the npm version.

node-version: 1.16.x
npm-version: 8.5.5

There is a similar issue here https://github.com/actions/setup-node/issues/213, but it's for a different reason and this one can be resolved by setting the node version. However this is not enough for the problems I have been facing.

Justification:
Currently I am struggling with a bug in npm from versions 8.11 to 8.13. These are automatically installed when you chose node version 1.16. This means I have to set back my npm version so the ci can run, which I can do in an extra ci step.

However to me the issue is that the npm version will change over time, without our input. We'd like control over this to prevent issues like the one above from showing up.

Are you willing to submit a PR?
Not currently but I might in the future.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing setup-node's existing node-version input and how its GitHub Actions workflow installs Node and npm. Determine where an npm-version input would fit, then verify that a requested npm version is installed reproducibly without changing the selected Node version.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.