Closed MichalBryxi closed 6 months ago
what tool are you using / what reported this error? I haven't seen it :sweat_smile:
Right from current main
branch:
pnpm install
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing pnpm@8.15.5+sha256.4b4efa12490e5055d59b9b9fc9438b7d581a6b7af3b5675eb5c5f447cee1a589.
! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager
Scope: all 3 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 1.2s
The node/corepack documentation refers to this here. I guess it might not be an issue if one does not use corepack? IDK, just annoying to always reset this change back :(
pnpm --version
8.15.5
node --version
v20.11.0
corepack --version
0.26.0
which pnpm
/usr/local/bin/pnpm
which node
/Users/michal/Library/pnpm/node
which corepack
/usr/local/bin/corepack
can the packageManager version use a semver range rather than a hash?
how do we keep it in sync with the volta config?
can the packageManager version use a semver range rather than a hash
Tried to experiment with it, but I did not find a way to set it to a range. When I corepack use pnpm@^8.15
, it still ends with: pnpm@8.15.6+sha256.01...
how do we keep it in sync with the volta config?
Ah, did not notice that it assumes volta
for usage. I can't tell what's the expected future, but when one uses corepack, doesn't it solve the things that volta
solves?
Maybe it's just a me problem, so no need to bend over backwards. Just +1 annoyance really :)
but when one uses corepack, doesn't it solve the things that volta solves?
ye
, it still ends with: pnpm@8.15.6+sha256.01...
what happens if you define the packageManager
field manually?
Just +1 annoyance really :)
<3
I can't tell what's the expected future
I wouldn't expect volta, given the activity on the repo: https://github.com/volta-cli/volta/pulse/monthly
but things could change who knows -- volta is in a "good enough" state for a lot of folks (for local dev). Like with corepack, I imagine, it's good to have something managing your toolchain.
It's just a matter now if we can support both across the ecosystem, if we need to -- like, can renovate or something help?
what happens if you define the packageManager field manually?
String does not match the pattern of "(npm|pnpm|yarn|bun)@\d+\.\d+\.\d+(-.+)?".
Death by N+1 tools :D
I mean, "packageManager": "pnpm@8.15.1"
?
That works! I set it to the same version as what volta
is instructed to use: 8.13.1
.
My local environment always complains that:
And adds this line to
package.json
.So I thought I will just create a PR that will make the change so that I don't have to revert it all the time...