← All tasks
javascriptyarnpkg/berry #966Not checked yet

[Bug] - Styled components - Module not found: A package is trying to access a peer dependency that should be provided by its direct ancestor but isn't

envgap__yarnpkg__berry-966

Original GitHub issue ↗Opened 2020-02-18

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not checked yet.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

yarnpkg/berry #966 · read the original issue
### Bug description



It is an CRA with only styled-components as dependencies see below for repo. 



```

Failed to compile.

./.yarn/$$virtual/styled-components-virtual-3b06c0951a/0/cache/styled-components-npm-5.0.1-87fcb612e6-2.zip/node_modules/styled-components/dist/styled-components.browser.esm.js

Module not found: A package is trying to access a peer dependency that should be provided by its direct ancestor but isn't

```



```bash 

yarn dlx @yarnpkg/doctor

 YN0000: ┌ Resolution step

➤ YN0000: └ Completed in 9.79s

➤ YN0000: ┌ Fetch step

➤ YN0000: └ Completed in 0.15s

➤ YN0000: ┌ Link step

➤ YN0000: └ Completed in 0.4s

➤ YN0000: Done in 10.35s



➤ YN0000: Found 1 package(s) to process

➤ YN0000: For a grand total of 5 file(s) to validate



➤ YN0000: ┌ /home/zerocity/projects/styled-components-yarn-2/package.json

➤ YN0000: │ /home/zerocity/projects/styled-components-yarn-2/package.json:8:36: Unmet transitive peer dependency on @testing-library/dom@>=5, via @testing-library/user-event@^7.1.2

➤ YN0000: │ /home/zerocity/projects/styled-components-yarn-2/package.json:12:26: Unmet transitive peer dependency on react-is@>= 16.8.0, via styled-components@^5.0.1

➤ YN0000: └ Completed in 0.74s



➤ YN0000: Failed with errors in 0.74s

```



**What is the current behavior?**

Failed to compile.



**What is the expected behavior?**

dont "crash"



**Steps to Reproduce**

```bash

git clone https://github.com/zerocity/styled-components-yarn-2

yarn start

```

sorry i dont know how i would do this with sherlock



**Environment**



- Node Version: 12.14.0

- Yarn v2 Version: `2.0.0-rc.29` 

- OS and version: Linux jerico 5.3.0-29-generic #31-Ubuntu SMP Fri Jan 17 17:27:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy reproduction is generic install-only; match the actual issue failure before admission.