`yarn set version from sources` 结果 "Unrecognized or legacy configuration settings found: changesetIgnorePatterns"

`yarn set version from sources` results in "Unrecognized or legacy configuration settings found: changesetIgnorePatterns"

似乎无法从源安装 yarn,我什至不确定如何调试这类东西。

我尝试过的事情:

从我读过的文档来看,changesetIgnorePatterns 应该是一个有效的配置设置,所以我唯一能想到的是 yarn 正在报告 v2.4.0,但在运行时以某种方式使用了旧版本。

% node -v
v15.10.0

% npm -v
7.6.0

% yarn -v
2.4.0

% yarn set version from sources
➤ YN0000: Fetching the latest commits

  $ git fetch origin master --force
  $ git reset --hard FETCH_HEAD
  $ git clean -dfx

➤ YN0000: Building a fresh bundle

Usage Error: Unrecognized or legacy configuration settings found: changesetIgnorePatterns - run "yarn config -v" to see the list of settings supported in Yarn (in /private/var/folders/3y/zswk9wjs4b19pyyvyymgmnzh0000gn/T/yarnpkg-sources/d0a670/.yarnrc.yml)

$ yarn run [--inspect] [--inspect-brk] <scriptName> ...
➤ YN0001: Error: Child "yarn" exited with exit code 1
    at ChildProcess.<anonymous> (/Users/frankjmattia/.yarn/releases/yarn-berry.cjs:2:403919)
    at ChildProcess.emit (node:events:378:20)
    at maybeClose (node:internal/child_process:1067:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
➤ YN0000: Failed with errors in 1s 120ms

如能提供有关故障排除的任何帮助或指导,我们将不胜感激。

虽然我已经多次删除了.yarn.yarnrc.yarnrc.yml,但在更新到yarn 2.4.1后终于成功了。

我仍然不知道这是我自己的错还是 yarn 真的改变了什么,但我的问题现在已经解决了。感谢对问题投赞成票的人,很抱歉我没能给出更满意的答案。

为我解决的问题是确保项目目录不是主目录。使用 Dockerfiles 时经常出现这种情况 - https://github.com/yarnpkg/berry/issues/2187