Skip to content

global install of Corepack should not enable Corepack #697

Closed as not planned

Description

@MikeMcC399

What would you like?

When Corepack is installed from the npm registry with

npm install -g corepack

then Corepack should not be automatically enabled for pnpm and Yarn.

Why is this needed?

In a situation where Corepack is needed for Yarn and not wanted for pnpm, automatically enabling Corepack for pnpm breaks local workflows that expect pnpm to have been installed with npm install -g pnpm. Installing Corepack overrides this. Due to #112 it is not possible to simply execute corepack disable pnpm because Corepack does not restore the original state.

Activity

  1. MikeMcC399 commented on Apr 8, 2025

    @MikeMcC399
    ContributorAuthor

    This is more of a problem for locally working with Corepack since the settings persist between projects.

    In CI environments, jobs are generally isolated from each other, so it is less likely to have a mixture of Yarn and pnpm in the same CI job.

    Possibly Corepack could be set up to be enabled by default in CI only and / or this could be influenced by a new COREPACK environment variable.

  2. MikeMcC399 commented on Oct 15, 2025

    @MikeMcC399
    ContributorAuthor

    Closing, as with the release of Node.js 25.0.0, changing the behavior could be disruptive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions