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?
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.jsonhas been configured"packageManager":"pnpm@10.0.0". People can stil runnpm installin this project.I know
@antfu/niand #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 runningnpm installin pnpm/yarn projects.Any solutions?