Determining appropriate pnpm version to use from lock file #3341
Unanswered
privatenumber
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Currently, in the docs, we recommend explicitly install a major pnpm version on CI, like:
For dev environment, I think we will recommend to use volta which will automatically pick the right pnpm version (but it does not support pnpm yet). As for automatically installing the right pnpm version globally... I guess we could implement something like it but I am not sure how needed that is. I think it is pretty straightforward to specify which pnpm version needs to be installed. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use
npx pnpm i --frozen-lockfile
in my CIs to install dependencies, but with the new pnpm v6 release that drops Node.js v10 support, installations have been breaking in projects where I test in a Node.js v10 environment.While I am happy that Node.js v10 support is being dropped, I can imagine this being a problem again with future Node.js version deprecations.
Of course I can work around this by manually fixing the version of pnpm to install, but I was wondering if there's a "smarter" way to automatically determine which version of pnpm to use.
I checked
pnpm-lock.yaml
for any hints of which version of pnpm was used to create it, but the only hint I seem to get islockfileVersion
, which doesn't seem to directly correspond with the pnpm version.Is there a way to infer or determine the version of pnpm used to create the lock file?
Beta Was this translation helpful? Give feedback.
All reactions