Skip to content
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

Set npm/yarn/pnpm version #529

Open
stijn-gravity opened this issue Jun 27, 2022 · 6 comments
Open

Set npm/yarn/pnpm version #529

stijn-gravity opened this issue Jun 27, 2022 · 6 comments
Labels
feature request New feature or request to improve the current logic

Comments

@stijn-gravity
Copy link

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 #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.

@stijn-gravity stijn-gravity added feature request New feature or request to improve the current logic needs triage labels Jun 27, 2022
@vsafonkin
Copy link

Hi @stijn-gravity, thank you for your proposal, we will consider it.

@haneenmahd
Copy link

I will be opening a PR on this!

@jasikpark
Copy link

Two options for specifying a solution could be querying the volta section of the package.json if you manage versions via that, or via the engines portion of the package.json https://docs.npmjs.com/cli/v8/configuring-npm/package-json#engines

@kidonng
Copy link
Contributor

kidonng commented Sep 14, 2022

You can "set" npm/yarn/pnpm version if you use corepack:

corepack npm@a.b.c install
corepack yarn@a.b.c install
corepack pnpm@a.b.c install

Or manually install package managers:

npm install npm@a.b.c
yarn set version a.b.c
npm install pnpm@a.b.c # Or use pnpm/action-setup which has a version option

@nickmccurdy
Copy link

This should be solved by #531

@styfle
Copy link

styfle commented Sep 28, 2022

Also see #546

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

7 participants