Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yarn 2 - 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 #7906

Closed
zerocity opened this issue Feb 14, 2020 · 1 comment

Comments

@zerocity
Copy link

Bug description

It is an CRA with only styled-components as dependencies see below for repo.
I am not sure is this an issue with the new yarn version or how styled-components is build/ describes its peer-deps.

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

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

Environment

  • Node Version: 12.14.0
  • Yarn v2 Version: 2.0.0-rc.29
  • OS and version: Linux jerico 5.3.0-29-generic engineDependencies #31-Ubuntu SMP Fri Jan 17 17:27:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
@zerocity
Copy link
Author

moved to yarnpkg/berry#966

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant