question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug?]: `@yarnpkg/plugin-version < 3.1.0-rc.2` is not compatible with `@yarnpkg/cli >= 3.1.0-rc.12`

See original GitHub issue

Self-service

  • I’d be willing to implement a fix

Describe the bug

@yarnpkg/plugin-version@3.1.0-rc.2 is not compatible with @yarnpkg/cli < 3.1.0-rc.12 @yarnpkg/plugin-version < 3.1.0-rc.2 is not compatible with @yarnpkg/cli >= 3.1.0-rc.12

To reproduce

const util = require('util');
const _exec = util.promisify(require('child_process').exec);
const _execFile = util.promisify(require('child_process').execFile);

const env = {...process.env, YARN_ENABLE_COLORS: 0, YARN_IGNORE_PATH: 1, YARN_ENABLE_INLINE_BUILDS: 1, YARN_ENABLE_IMMUTABLE_INSTALLS: 0};

const exec = async cmd => {
  let stdout
  try {
    ({stdout} = await _exec(cmd, { env }));
  } catch (error) {
    error.message = error.stdout
    throw error
  }
  return stdout
};

const execFile = async (...args) => {
  let stdout
  try {
    ({stdout} = await _execFile(process.execPath,[...args], { env }));
  } catch (error) {
    error.message = error.stdout
    throw error
  }
  return stdout
};

await packageJson({});
await exec('yarn set version 3.1.0-rc.11');

await expect(execFile(...'./.yarn/releases/yarn-3.1.0-rc.11.cjs plugin import @yarnpkg/plugin-version'.split(' '))).resolves.toBeTruthy();
await expect(execFile(...'./.yarn/releases/yarn-3.1.0-rc.11.cjs set version 3.1.0-rc.12'.split(' '))).resolves.toBeTruthy();
await expect(execFile(...'./.yarn/releases/yarn-3.1.0-rc.12.cjs plugin import @yarnpkg/plugin-version'.split(' '))).resolves.toBeTruthy();

Environment

System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 12.22.7 - /private/var/folders/x9/m_y2fpmn1wgcd33f1y0tdhgr0000gq/T/xfs-3eedbbd3/node
    Yarn: 3.1.0-rc.12 - /private/var/folders/x9/m_y2fpmn1wgcd33f1y0tdhgr0000gq/T/xfs-3eedbbd3/yarn
    npm: 6.14.15 - ~/.nvm/versions/node/v12.22.7/bin/npm
  npmPackages:
    jest: ^27.3.1 => 27.2.0

Additional context

Errlog

Error: Internal Error: Cannot redefine settings "changesetBaseRefs"

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:11
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
rachel-churchcommented, Nov 17, 2021

I also encountered this bug and any attempt to upgrade yarn to v3.1.0 and plugin-version to v3.1.0 resulted in the following error for me:

Internal Error: Cannot redefine settings "changesetBaseRefs"
    at Ra.importSettings (/Users/rachelchurch/src/marketing/.yarn/releases/yarn-3.1.0.cjs:432:26048)
    at Ra.activatePlugin (/Users/rachelchurch/src/marketing/.yarn/releases/yarn-3.1.0.cjs:432:25923)
    at Function.find (/Users/rachelchurch/src/marketing/.yarn/releases/yarn-3.1.0.cjs:432:24189)
    at async i (/Users/rachelchurch/src/marketing/.yarn/releases/yarn-3.1.0.cjs:448:11019)
    at async r (/Users/rachelchurch/src/marketing/.yarn/releases/yarn-3.1.0.cjs:448:10617)

Workaround

  1. Manually edit the .yarnrc.yml file manually and remove the @yarnpkg/plugin-version from the plugins list and any configuration options specific to plugin-version
  2. Update yarn with yarn set version 3.1.x or a similar yarn set version command
  3. Upgrade the versions plugin with yarn plugin import @yarnpkg/plugin-version@3.1.0-rc.3
  4. Manually edit the .yarnrc.yml file to add back your versions plugin configuration options
1reaction
cuylcommented, Oct 25, 2021

This error was introduced by d2f7bea7f0749e656aa68263b8d7d7f68d7f1905 .

Maybe it is better to catch the error as a warning instead of exit directly. so we can run yarn plugin import @yarnpkg/plugin-version to update the incompatible plugin to a new version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

@yarnpkg/plugin-version | Yarn - Package Manager
@yarnpkg/sdks is a CLI tool to generate the PnP Editor SDKs. @yarnpkg/shell is a portable bash-like shell interpreter. Yarn packages. The following packages...
Read more >
ubuntupackages.cgi - UDD - Debian
0ad 0.0.26-2 0ad-data 0.0.26-1 0xffff 0.9-1 1oom 1.0-2 2048 0.20220905.1556-1 ... dahdi-linux 1:2.11.1~dfsg-1ubuntu12 dahdi-tools 1:3.1.0-2 dailystrips ...
Read more >
@yarnpkg/builder - npm
A CLI tool designed for creating, building, and managing complex plugins. This version of the builder is for creating plugins for Yarn 3.x....
Read more >
yarnpkg: depends on incompatible version of commander
Bug #1019291: yarnpkg: depends on incompatible version of ... at /usr/share/nodejs/yarn/lib/cli/index.js:511:88 ... ii node-bytes 3.1.2-1
Read more >
Compare Packages Between Distributions - DistroWatch.com
angband-audio 1:3.1.0-1 angelscript 2.35.0+ds-1.1 angrydd 1.0.1-13 angular.js 1.8.2-2 angular-maven-plugin 0.3.4-3 animals 201207131226-2.1
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found