Skip to content

packages in pnpm-workspace.yaml should be optional #8968

@ntnyq

Description

@ntnyq

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

v10.0.0

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI

Link to the code that reproduces this issue or a replay of the bug

https://github.com/ntnyq-dev/repro-pnpm-workspace-packages

Reproduction steps

Run pnpm install or pnpm help, you will get packages field missing or empty error.

Uncomment content in pnpm-workspace.yaml and run again, works as expected.

Describe the Bug

As it defined in

packages: string[]

packages field is required to be a string list.

But in this case, only catalog is used.

This is not a monorepo and there is no need to use packages field.

Besides I don't think run pnpm help need to check packages field in pnpm-workspace.yaml.

Expected Behavior

Can use catalog feature with pnpm-workspace.yaml without packages field.

Which Node.js version are you using?

22.13.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions