Skip to content

action-setup@v6 does not install pnpm version specified in package_json_file #227

@timdawborn

Description

@timdawborn

This is probably the same underlying cause as #225

When specifying package_json_file and that package.json file has a packageManager field that specifies the version of pnpm to use, the v6 release does not load the specified version.

This results in the following error, which we are currently seeing across tens of repos:

ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "<path>/pnpm-lock.yaml" is broken: expected a single document in the stream, but found more

The packageManager field is set to pnpm 10 in the specified package.json file:

$ grep packageManager package.json
  "packageManager": "pnpm@10.28.1",

The GitHub Action is invoked with the package_json_file input argument only:

    - name: Setup pnpm
      uses: pnpm/action-setup@v6
      with:
        package_json_file: "${{ inputs.working-directory }}/package.json"

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