Skip to content

How to prevent from running npm install in pnpm or yarn projects? #674

@zanminkian

Description

@zanminkian

Since corepack does not support npm, it's always possible to run a npm command within a project configured to be used with another package manager.
For example, a package.json has been configured "packageManager":"pnpm@10.0.0". People can stil run npm install in this project.

I know @antfu/ni and #650 can help. I also know corepack is going to completely remove ALL code about npm. However, for a better development experience, it is widely expected to throw an error when running npm install in pnpm/yarn projects.

Any solutions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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