Skip to content
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

Cannot run pnpm dist-tag react in a pnpm configured project #68

Closed
Jack-Works opened this issue Nov 19, 2021 · 4 comments
Closed

Cannot run pnpm dist-tag react in a pnpm configured project #68

Jack-Works opened this issue Nov 19, 2021 · 4 comments

Comments

@Jack-Works
Copy link
Contributor

pnpm dist-tag will delegate the command to npm dist-tag and cause an error.

pnpm dist-tag react
Usage Error: This project is configured to use pnpm

$ npm ...

I suggest making some commands that can be run in any project like dist-tag because they do not do anything related to the project.

@arcanis
Copy link
Contributor

arcanis commented Nov 19, 2021

That's an interesting one, didn't know pnpm delegates commands to npm 🤔 cc @zkochan

@zkochan
Copy link

zkochan commented Nov 19, 2021

Yes, we do currently pass through to npm CLI some of the commands. We might implement them in pnpm in the future but it is not high priority.

Can we run npm with some option or env variable to skip the check?

@andreialecu
Copy link

I'd also like some sort of env variable to skip the check. Two examples:

Can't install global packages using npm. Some tools rely on running ng directly without the yarn prefix. This can be worked around by cding to some directory where yarn isn't set up as the PM.

➜ npm install -g @angular/cli                                                           
Usage Error: This project is configured to use yarn

$ npm ...

And most importantly, release-it delegates to npm to publish packages. In a yarn project it cannot be used:

image

@styfle
Copy link
Member

styfle commented Mar 4, 2024

I'd also like some sort of env variable to skip the check.

There is one: COREPACK_ENABLE_STRICT=0

https://github.com/nodejs/corepack/blob/main/README.md#environment-variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants