启用该特性
由于处于实验状态,目前需要显式地启用 Corepack 才能生效。
要做到这一点,只需运行 corepack enable
,它将在您的环境中设置符号链接,在 node
二进制文件旁边(并在必要时覆盖现有的符号链接)。
从现在开始,任何对支持的二进制文件的调用都无需进一步设置即可工作。
如果您遇到问题,只需运行 corepack disable
以从您的系统中删除代理(并考虑在 Corepack 仓库上打开一个问题让我们知道)。
Due to its experimental status, Corepack currently needs to be explicitly
enabled to have any effect. To do that simply run corepack enable
, which
will set up the symlinks in your environment, next to the node
binary
(and overwrite the existing symlinks if necessary).
From this point forward, any call to the supported binaries will work
without further setup. Should you experience a problem, just run
corepack disable
to remove the proxies from your system (and consider
opening up an issue on the Corepack repository to let us know).