Skip to content

Cannot use pnpm dlx when dangerouslyAllowAllBuilds is true #10121

@patricklafrance

Description

@patricklafrance

Verify latest release

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

pnpm version

10.19.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/patricklafrance/pnpm-dlx-repro

Reproduction steps

OR

In an existing repository:

  • Create a pnpm-workspace.yaml file and add dangerouslyAllowAllBuilds: true
  • pnpm install
  • Create a script using pnpm dlx like: pnpm dlx rimraf node_modules
  • The following error will happen: ERR_PNPM_CONFIG_CONFLICT_BUILT_DEPENDENCIES  Cannot have both neverBuiltDependencies and onlyBuiltDependencies

Describe the Bug

When dangerouslyAllowAllBuilds: true is added to a pnpm-workspace.yaml file it seems impossible to define a script using pnpm dlx.

The following error happens:

ERR_PNPM_CONFIG_CONFLICT_BUILT_DEPENDENCIES  Cannot have both neverBuiltDependencies and onlyBuiltDependencies

Expected Behavior

No error.

Which Node.js version are you using?

25.0.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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions