Corepack 目前如何与 npm 交互?


虽然 Corepack 可以像任何其他包管理器一样轻松支持 npm,但默认情况下当前未启用它的 shim。 这有几个后果:

    While Corepack could easily support npm like any other package manager, its shims aren't currently enabled by default. This has a few consequences:

    • It's always possible to run a npm command within a project configured to be used with another package manager, since Corepack cannot intercept it.

    • While npm is a valid option in the "packageManager" property, the lack of shim will cause the global npm to be used.