-
-
Notifications
You must be signed in to change notification settings - Fork 202
Usage Error: This project is configured to use <pkgmgr> #157
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Or it could spawn a prompt: |
I would also like to be able to run things like Lines 46 to 55 in 312d9ea
I'm not sure if my case is a good use case for this config, but may be a good place to start? |
The corepack step as it exists causes issues if a machine already has corepack enabled and is using the npm shim: ``` olszewski@chriss-mbp cli % make corepack npm install -g corepack@latest Usage Error: This project is configured to use pnpm $ npm ... make: *** [corepack] Error 1 ``` I think we could get around this by changing to a working directory without a packageManager, but that feels very icky. Since we were only upgrading corepack in order to avoid [#110](nodejs/corepack#110) which only happens the first time a user sets up a package manager on a machine, I think this an acceptable regression in order to unblock development. We should follow what comes out of [vercel#157](nodejs/corepack#157) to see if we can add this back eventually.
- Related to nodejs#157
- Related to nodejs#157
I think a prompt would be annoying and cause more problems because you need a way to pass The only thing that might be safe to hard block is |
The corepack step as it exists causes issues if a machine already has corepack enabled and is using the npm shim: ``` olszewski@chriss-mbp cli % make corepack npm install -g corepack@latest Usage Error: This project is configured to use pnpm $ npm ... make: *** [corepack] Error 1 ``` I think we could get around this by changing to a working directory without a packageManager, but that feels very icky. Since we were only upgrading corepack in order to avoid [#110](nodejs/corepack#110) which only happens the first time a user sets up a package manager on a machine, I think this an acceptable regression in order to unblock development. We should follow what comes out of [#157](nodejs/corepack#157) to see if we can add this back eventually.
Using an env variable would be more practical than a |
I think an env var would be good. I also think corepack needs to be smart enough to ignore |
One other use case I face while using it was that some external dependencies of my repo might have pre/postinstall scripts that calls |
Hey y'all, this particular feature (command invocation prevention) has been an absolutely tremendous thorn in our side for the entire time we've been using In that time this feature has:
We find ourselves regularly using I hypothesize that we're going to see more and more of this as CI and PaaS vendors begin to roll out tooling to support I would like to see exploration of different ways to constrain this behavior:
|
This comment is at least partially wrong;
|
One of the biggest problems I have today with Corepack is the
Usage Error: This project is configured to use <pkgmgr>
.This happens when I run
npm i -g vercel@latest
in a project that is configured to use yarn or pnpm. This seems a little too strict because the global flag (-g) is not scoped to my current project.Similarly,
vercel dev
will shell out tonpm
ornpx
and corepack being enabled could block it from working properly, even if the system hasnpm
installed.While I think the intention is good (catch accidental typos), I think this shouldn't be the default behavior because it is too restrictive. Perhaps making this strict mode be opt-in would help Corepack go stable (see #104).
The text was updated successfully, but these errors were encountered: