Skip to content

BUG: Yarn Berry Installation not supported #614

@kneekeel

Description

@kneekeel

We have recently migrated our repositories from Yarn Classic -> Yarn Berry. The equivalent installation for packages is yarn install --immutable.

Suggestion

Update this line to:

    const yarnLock = fs.existsSync(path.resolve(workingDir, 'yarn.lock'))
    const isYarnBerry = fs.existsSync(path.resolve(workingDir, '.yarnrc.yml'))
    const packageLock = fs.existsSync(path.resolve(workingDir, 'package-lock.json'))
  

    let installScript = `npm install --production=false`
    if (yarnLock) {
      installScript = `yarn ${isYarnBerry ? '--immutable' :  '--frozen-lockfile'}`
    } else if (packageLock) {
      installScript = `npm ci`
    }

Happy to put in a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions