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

Warning: It looks like there are several instances of 'styled-components' initialized in this application. #32

Closed
TylerBarnes opened this issue Feb 14, 2019 · 2 comments

Comments

@TylerBarnes
Copy link

TylerBarnes commented Feb 14, 2019

Hey there, thanks for the great component!

I'm using this component with gatsbyjs and styled components alongside react-styled-carousel.
I'm getting this error

It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles not rendering properly, errors happening during rehydration process and makes your application bigger without a good reason.

See https://s-c.sh/2BAXzed for more info.

Is there a way for me to prevent react-styled-carousel from loading styled components as well?

If I remove react-styled-carousel the error goes away.

@TylerBarnes
Copy link
Author

I could be wrong but checking out package.json I believe react and styled components should only be peer dependencies but it looks like they're duplicated in to peer dependencies and dependencies.

Repository owner locked as off-topic and limited conversation to collaborators Mar 17, 2019
@ItsMrAkhil
Copy link
Owner

@TylerBarnes Feel free to reopen the issue if you think it's an issue. And add more details

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

No branches or pull requests

2 participants