Skip to content

Not detecting yarn berry correctly #752

Open
@fisker

Description

@fisker

Description

Use yarn berry without packageManager field, the yarn.lock will be detected, and use the legacy yarn command, and throws

× Error: Command failed with exit code 1: yarn config get registry
Usage Error: Couldn't find a configuration settings named "registry"

Steps to reproduce

  1. yarn init -y
  2. yarn set version berry
  3. yarn
  4. np

Expected behavior

Use correct yarn berry config.

Environment

np - 10.0.6
Node.js - 22.4.0
npm - 4.2.2
Git - git version 2.42.0.windows.2
OS - Windows 10

Possible solution is switch to check .yarnrc.yml instead or check yarn.lock but run yarn --version then check version number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions