Skip to content

preinstall script in v2.23.2 breaks npm/yarn installs when used as a dependency #893

Description

@jmills4122

[email protected] added "preinstall": "npx only-allow pnpm" to package.json (via #883). This appears to be intended to enforce pnpm for local development, but the script ships in the published npm tarball and fires when apify-client is installed as a dependency of other packages.

This breaks npm install -g apify-cli and any project that depends on 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

Potential fix: Either remove the preinstall script from the published tarball , or rely on the packageManager field + Corepack which only applies at the repo level. Note that only-allow is archived and has a known issue with firing during dependency installation.

Affected: v2.23.2 only (v2.23.1 is fine)

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-toolingIssues with this label are in the ownership of the tooling team.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions