question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set npm/yarn/pnpm version

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:20
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jasikparkcommented, Aug 2, 2022

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

1reaction
haneenmahdcommented, Jul 30, 2022

I will be opening a PR on this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm, pnpm, and Yarn | WebStorm Documentation - JetBrains
In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Languages & Frameworks | Node.js and select the path to the Yarn 2 package...
Read more >
pnpm - npm
Latest version: 7.20.0, last published: 11 hours ago. Start using pnpm in your project by running ... pnpm is up to 2x faster...
Read more >
Installation | pnpm
You may install pnpm even if you don't have Node.js installed, using the ... With Node.js v16.17 or newer, you may install the...
Read more >
Stop Using NPM/Yarn. Use PNPM Instead - Bits and Pieces
When installing dependencies, npm and Yarn Classic try to elevate all packages to the root of node_modules whenever possible. Therefore, dependencies not listed ......
Read more >
Advanced package manager features for npm, Yarn, and pnpm
When using the default configuration, pnpm and Yarn Berry do not use the same dependency resolution algorithms as npm and Yarn Classic, which ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found