Open NogrTL opened 11 months ago
Duplicate of https://github.com/styled-components/styled-components/issues/4179
npx envinfo --system --binaries --npmPackages styled-components,babel-plugin-styled-components --markdown
Setup styled-components with Webpack + Babel + babel-plugin-styled-components Example here -> https://github.com/NogrTL/Babel-styled-componenets
yarn install
No warnings peer dependencies are incorrectly met
peer dependencies are incorrectly met
Got warning babel-plugin-styled-components@npm:2.1.4 [33f51] doesn't provide @babel/core (p86bed), requested by @babel/plugin-syntax-jsx
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
peerDependencies:@babel/core
babel-plugin-styled-components
styled-components
In confirmation of that - adding this overwrite to .yarnrc.yml solves the issue
.yarnrc.yml
packageExtensions: "babel-plugin-styled-components@*": peerDependencies: "@babel/core": "^7.0.0-0" "styled-components@*": peerDependencies: "@babel/core": "^7.0.0-0"
Duplicate of https://github.com/styled-components/styled-components/issues/4179
Environment
npx envinfo --system --binaries --npmPackages styled-components,babel-plugin-styled-components --markdown
System:
Binaries:
Reproduction
Setup styled-components with Webpack + Babel + babel-plugin-styled-components Example here -> https://github.com/NogrTL/Babel-styled-componenets
Steps to reproduce
yarn install
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
inbabel-plugin-styled-components
andstyled-components
https://yarnpkg.com/advanced/error-codes#yn0002---missing_peer_dependencyIn confirmation of that - adding this overwrite to
.yarnrc.yml
solves the issue