Search code examples
yarnpkgyarnpkg-v2

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


Can't seem to install yarn from sources and I'm not sure how to even debug this sort of thing.

Things I've tried:

  • homebrew nodejs and yarn
  • nodejs from official pkg

From the docs I've read, changesetIgnorePatterns should be a valid configuration setting so the only thing I can think of is yarn is reporting v2.4.0 but somehow utilizing an older version when it runs.

% 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

Any help or direction in how to troubleshoot would be greatly appreciated.


Solution

  • While I had already deleted .yarn, .yarnrc, and .yarnrc.yml multiple times, after updating to yarn 2.4.1 it finally worked.

    I still do not know if this was my own fault or if something had actually changed with yarn, but my problem is now solved. Thank you to whoever upvoted the question, I'm sorry I couldn't produce a more satisfactory answer.