Yarn v2+ 使用 .yarnrc.yml 配置文件,不支持 config set 命令。
编辑项目根目录或 ~/.yarnrc.yml:
npmRegistryServer: "http://127.0.0.1:8080/npm/"如果同时使用 npm Scope:
npmScopes:
my-org:
npmRegistryServer: "http://127.0.0.1:8080/npm/"yarn npm info react 2>&1 | grep malFuseyarn config unset npmRegistryServer --home
# 或直接编辑 ~/.yarnrc.yml 删除该行Yarn v2+ uses .yarnrc.yml. No config set command.
Edit project root or ~/.yarnrc.yml:
npmRegistryServer: "http://127.0.0.1:8080/npm/"For npm scopes:
npmScopes:
my-org:
npmRegistryServer: "http://127.0.0.1:8080/npm/"yarn npm info react 2>&1 | grep malFuseyarn config unset npmRegistryServer --home
# or edit ~/.yarnrc.yml to remove the line