-
Notifications
You must be signed in to change notification settings - Fork 173
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
[BUG] corepack enable npm pnpm
breaks 32 pnpm
commands
#419
Comments
Hopefully this will fix itself when |
Corepack would need to migrate to that & the design of |
On the contrary, I think that field would allow Corepack to defer to those tools rather than trying to guess – i.e. |
I'm definitely a big +1 on |
Why should Corepack change the default when the maintainer of the tool you mention is on the side of fixing it on his side? |
@arcanis I don't see any reference to resolving this problem in
Setting The potential fixes I can see here are below:
The first is out of our hands & I haven't heard of support for it yet from that project. The second requires some work & investigation to determine if it's even possible (which I don't have time for & don't think is good to add more project-specific logic). The last is the easiest/cleanest & the work has already been done. |
I think it would make sense if the check is implemented by the underlying tool anyway: you get the same UX (an error is thrown if you use the wrong package manager), but the logic is no longer in Corepack. It would also give 2. for free, as pnpm and npm will have to work out those things regardless of Corepack.
It seems that removing |
That sounds reasonable since |
Then we have very different reading comprehension. I myself read "pnpm can run npm with the COREPACK_ENABLE_STRICT=0 env variable" as a very clear explanation that pnpm could set the variable in the env when it calls npm. |
Loosing the constraints (ie.
In the example I provided I'm specifically concerned about
As you can see, even zoltan is surprised I brought this up because they did not think
I don't think this is a necessary/helpful comment to make.
You've added conditions which don't meet the requirements. I want Corepack to strictly manage |
Then don't run |
As a workaround, you can either disable npm (by running |
The fix on pnpm has landed, I think this can be closed. Until the fix makes its way to a pnpm release, you can use any of the workarounds described in my previous comment. Thanks for the report and let me know if you need any more help! |
Just want to note that the fix landed in |
Context
pnpm
shells out tonpm
for roughly 32 different commands.Current Behavior
Enabling both
pnpm
&npm
will break usage of numerous commands inpnpm
projects.Expected Behavior
pnpm
commands would not break. Corepack should understand this nuance or removenpm
.Steps to Reproduce
corepack enable npm pnpm
corepack use pnpm
pnpm login
get usage error (orpnpm access
,pnpm dist-tag
,pnpm org
,pnpm team
& many more)The text was updated successfully, but these errors were encountered: