only-allow
only-allow copied to clipboard
I have set 'npx only allow pnpm', but it only takes effect for Yarn
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
👀
Related issue: https://github.com/npm/cli/issues/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! :)
with [email protected] neither solution works for me. Not sure if it's because I'm using husky in a prepare script or not.
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 :(
same issue with npm 10