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

I have set 'npx only allow pnpm', but it only takes effect for Yarn #27

Open
LiuCaptain opened this issue Oct 23, 2023 · 5 comments
Open

Comments

@LiuCaptain
Copy link

When I set 'npx only allow pnpm' and use Yarn to install dependencies, it is not allowed, which is normal; But when I use NPM, it can still install dependencies normally

image

@ivomarsan
Copy link

👀

@prinsss
Copy link

prinsss commented Dec 6, 2023

Related issue: npm/cli#2660

This could be due to a npm problem that "preinstall" script gets run after dependencies installation.

The npx only-allow pnpm command should be executed before dependencies installation to properly abort the process when using other package managers, otherwise it could be meaningless.

Since the upstream issue could be hard to get fixed, I took another approach to achieve that and created this package just-pnpm to force project contributors to use pnpm.

Hope this helps! :)

@intellix
Copy link

with [email protected] neither solution works for me. Not sure if it's because I'm using husky in a prepare script or not.

@kepi
Copy link

kepi commented Dec 21, 2023

with [email protected] neither solution works for me. Not sure if it's because I'm using husky in a prepare script or not.

Same - and I have no prepare script :(

@menasheh
Copy link

menasheh commented Jan 3, 2024

same issue with npm 10

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

6 participants