-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
✨ enhancementNew feature or requestNew feature or request
Description
The problem
[percy] Error: @percy/cli-exec tried to access @percy/client, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: @percy/client (via "@percy/client/utils")
Required by: @percy/cli-exec@npm:1.28.7 (via /Users/wmaj/.yarn/berry/cache/@percy-cli-exec-npm-1.28.7-55645a8ef5-10c0.zip/node_modules/@percy/cli-exec/dist/exec.js)
…followed by a couple more similar errors.
Environment
- Node version: 22.0.0
@percy/cliversion: 1.28.7- Version of Percy SDK you’re using: ?
- If needed, a build or snapshot ID: ?
- OS version: macOS 14.5 (23F79)
- Type of shell command-line [interface]: zsh
Details
The error described above appears when percy exec command is attempted from Yarn Plug'n'Play, which is treating wrong/missing dependencies more strictly than other package managers. While this error appears on Yarn only, it signifies a deeper issue that other users of other package managers might encounter.
Adding the following to yarnrc.yml:
packageExtensions:
'@percy/cli-exec@*':
dependencies:
'@percy/client': '*'
'@percy/playwright@*':
dependencies:
'@percy/sdk-utils': '*'
peerDependencies:
playwright: '*'fixes the issue, but it shouldn't be necessary.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
✨ enhancementNew feature or requestNew feature or request