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

Missing peerDependencies on babel-plugin-styled-components #400

Open
NogrTL opened this issue Sep 25, 2023 · 0 comments
Open

Missing peerDependencies on babel-plugin-styled-components #400

NogrTL opened this issue Sep 25, 2023 · 0 comments

Comments

@NogrTL
Copy link

NogrTL commented Sep 25, 2023

Duplicate of styled-components/styled-components#4179

Environment

npx envinfo --system --binaries --npmPackages styled-components,babel-plugin-styled-components --markdown

System:

  • OS: Windows 10 10.0.22621
  • CPU: (12) x64 AMD Ryzen 5 1600 Six-Core Processor
  • Memory: 3.50 GB / 15.92 GB

Binaries:

  • Node: 16.20.1 - ~\AppData\Local\nvs\default\node.EXE
  • Yarn: 3.6.3 - ~\AppData\Local\nvs\default\yarn.CMD
  • npm: 8.19.4 - ~\AppData\Local\nvs\default\npm.CMD

Reproduction

Setup styled-components with Webpack + Babel + babel-plugin-styled-components
Example here -> https://github.com/NogrTL/Babel-styled-componenets

Steps to reproduce

  1. Run yarn install
  2. Watch

Expected Behavior

No warnings peer dependencies are incorrectly met

Actual Behavior

Got warning babel-plugin-styled-components@npm:2.1.4 [33f51] doesn't provide @babel/core (p86bed), requested by @babel/plugin-syntax-jsx

If this article to be believed you're missing peerDependencies:@babel/core in babel-plugin-styled-components and styled-components
https://yarnpkg.com/advanced/error-codes#yn0002---missing_peer_dependency

In confirmation of that - adding this overwrite to .yarnrc.yml solves the issue

packageExtensions:
  "babel-plugin-styled-components@*":
    peerDependencies:
      "@babel/core": "^7.0.0-0"
  "styled-components@*":
    peerDependencies:
      "@babel/core": "^7.0.0-0"
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