Skip to content

fix: remove preinstall script that breaks npm/yarn consumers#894

Open
jmills4122 wants to merge 1 commit intoapify:masterfrom
jmills4122:fix/remove-preinstall-from-published-tarball
Open

fix: remove preinstall script that breaks npm/yarn consumers#894
jmills4122 wants to merge 1 commit intoapify:masterfrom
jmills4122:fix/remove-preinstall-from-published-tarball

Conversation

@jmills4122
Copy link
Copy Markdown

@jmills4122 jmills4122 commented May 7, 2026

Removes the preinstall: "npx only-allow pnpm" script from package.json.

This script ships in the published tarball and runs when apify-client is installed as a dependency — it breaks npm install -g apify-cli and anything else that pulls in apify-client via npm or yarn:

npm error path .../node_modules/apify-client
npm error command failed
npm error command sh -c npx only-allow pnpm

The packageManager field already handles pnpm enforcement for local dev via Corepack without affecting downstream consumers. only-allow is also archived and has a known issue with firing during dependency installs.

Only affects v2.23.2.

The `preinstall: "npx only-allow pnpm"` script ships in the published
tarball and fires when apify-client is installed as a dependency,
blocking npm and yarn users. The `packageManager` field already
enforces pnpm for local development via Corepack.
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

Successfully merging this pull request may close these issues.

2 participants