jscpd icon indicating copy to clipboard operation
jscpd copied to clipboard

does not run with yarn berry plug and play

Open macrozone opened this issue 2 years ago • 2 comments

Describe the bug

using this package with yarn berry yields:

Error: @jscpd/html-reporter tried to access @jscpd/finder, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: @jscpd/finder
Required by: @jscpd/html-reporter@npm:3.4.5 (via /path/to/project/.yarn/cache/@jscpd-html-reporter-npm-3.4.5-316e394113-91619da791.zip/node_modules/@jscpd/html-reporter/dist/)

To Reproduce Steps to reproduce the behavior:

  1. project with yarn berry (plug and play linker)
  2. add it locally: yarn add -D jscpd
  3. run yarn jscpd

Expected behavior

dependencies should be properly declared in the package

macrozone avatar Sep 09 '22 10:09 macrozone

workaround:

in your .yarnrc.yml add this:

packageExtensions:
  "@jscpd/html-reporter@*":
    dependencies:
      "@jscpd/finder": "*"

macrozone avatar Sep 09 '22 10:09 macrozone

Thank you for the report, will fix

kucherenko avatar Sep 09 '22 15:09 kucherenko