babel-plugin-styled-components icon indicating copy to clipboard operation
babel-plugin-styled-components copied to clipboard

Npm error while installing latest version (v6.0.0-rc.6)

Open enoh-barbu opened this issue 2 years ago • 1 comments

npm ERR! Found: [email protected]
npm ERR! node_modules/styled-components
npm ERR!   styled-components@"^6.0.0-rc.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer styled-components@">= 2" from [email protected]
npm ERR! node_modules/babel-plugin-styled-components
npm ERR!   dev babel-plugin-styled-components@"^2.1.4" from the root project
npm ERR!   peerOptional babel-plugin-styled-components@">= 2" from [email protected]
npm ERR!   node_modules/styled-components
npm ERR!     styled-components@"^6.0.0-rc.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

What I'm doing wrong? just tried to install the lastest version

enoh-barbu avatar Jun 23 '23 20:06 enoh-barbu

from a fresh npm project:

npm i react [email protected] babel-plugin-styled-components
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/styled-components
npm ERR!   styled-components@"6.0.0-rc.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer styled-components@">= 2" from [email protected]
npm ERR! node_modules/babel-plugin-styled-components
npm ERR!   babel-plugin-styled-components@"*" from the root project
npm ERR!   peerOptional babel-plugin-styled-components@">= 2" from [email protected]
npm ERR!   node_modules/styled-components
npm ERR!     styled-components@"6.0.0-rc.6" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/styled-components
npm ERR!   peer styled-components@">= 2" from [email protected]
npm ERR!   node_modules/babel-plugin-styled-components
npm ERR!     babel-plugin-styled-components@"*" from the root project
npm ERR!     peerOptional babel-plugin-styled-components@">= 2" from [email protected]
npm ERR!     node_modules/styled-components
npm ERR!       styled-components@"6.0.0-rc.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

I guess we need to fix peerDependencies in package.json

ycytt-rs avatar Jun 24 '23 10:06 ycytt-rs