Describe the bug
When installing @redocly/cli in strict peer dependency environments, the installation fails because better-ajv-errors (a transitive dependency via @redocly/respect-core) declares ajv as a peer dependency, but it's not installed or made available by the parent package. This causes the installation to fail when strictPeerDependencies: true is enabled.
To Reproduce
- Create a
pnpm-workspace.yaml with strictPeerDependencies: true
- Add
@redocly/cli as a dependency to a workspace package
- Run
pnpm install with strict peer dependency checking enabled
- See the error:
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
└─┬ @redocly/cli 1.34.2
└─┬ @redocly/respect-core 1.34.2
└─┬ better-ajv-errors 1.2.0
└── ✕ missing peer ajv@"4.11.8 - 8"
Expected behavior
Installation should succeed with strict peer dependency checking enabled. @redocly/respect-core should add ajv as a dependency to ensure it's available for better-ajv-errors.
Logs
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
└─┬ @redocly/cli 1.34.2
└─┬ @redocly/respect-core 1.34.2
└─┬ better-ajv-errors 1.2.0
└── ✕ missing peer ajv@"4.11.8 - 8"
Redocly version(s)*
@redocly/cli@1.34.2
Node.js version(s)
Node.js 22
OS, environment
Docker container and CI environments with strict peer dependency checking
Additional context
This issue occurs in environments where pnpm is configured with strictPeerDependencies: true (a best practice for dependency management). The missing peer dependency prevents automated builds and containerized deployments from succeeding.
Describe the bug
When installing
@redocly/cliin strict peer dependency environments, the installation fails becausebetter-ajv-errors(a transitive dependency via@redocly/respect-core) declaresajvas a peer dependency, but it's not installed or made available by the parent package. This causes the installation to fail whenstrictPeerDependencies: trueis enabled.To Reproduce
pnpm-workspace.yamlwithstrictPeerDependencies: true@redocly/clias a dependency to a workspace packagepnpm installwith strict peer dependency checking enabledExpected behavior
Installation should succeed with strict peer dependency checking enabled.
@redocly/respect-coreshould addajvas a dependency to ensure it's available forbetter-ajv-errors.Logs
Redocly version(s)*
@redocly/cli@1.34.2
Node.js version(s)
Node.js 22
OS, environment
Docker container and CI environments with strict peer dependency checking
Additional context
This issue occurs in environments where
pnpmis configured withstrictPeerDependencies: true(a best practice for dependency management). The missing peer dependency prevents automated builds and containerized deployments from succeeding.