You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2026. It is now read-only.
Its expected behavior is to block these edge cases (and thus only allow PNPM):
npm i
npm i package
npm i -D package
However, its observed behavior blocks npm i from running, but allows npm i package and npm i -D package to run.
Even though only-allow blocks npm i from running, npm i still creates package-lock.json.
I tried different variations of the preinstall script, which all fail to block the aforementioned edge cases:
npx only-allow pnpm
npx -y only-allow pnpm (I'm using version pnpm@10.13.1)
only-allow pnpm (after pnpm add -D only-allow)
Unfortunately—until this problem is fixed—I cannot rely on the package only-allow!
Are there any workarounds? If so, I'd appreciate them in the documentation–I can help!
As per the docs, to prevent other package managers , I used this preinstall script to your
package.json:Its expected behavior is to block these edge cases (and thus only allow PNPM):
npm inpm i packagenpm i -D packageHowever, its observed behavior blocks
npm ifrom running, but allowsnpm i packageandnpm i -D packageto run.Even though
only-allowblocksnpm ifrom running,npm istill createspackage-lock.json.I tried different variations of the preinstall script, which all fail to block the aforementioned edge cases:
npx only-allow pnpmnpx -y only-allow pnpm(I'm using versionpnpm@10.13.1)only-allow pnpm(afterpnpm add -D only-allow)Unfortunately—until this problem is fixed—I cannot rely on the package
only-allow!Are there any workarounds? If so, I'd appreciate them in the documentation–I can help!