Several instances of 'styled-components' initialized in this application.
See original GitHub issueDescription
Not sure if this would be classified as a bug, but should the default npx init provide the following warning when using it on the default Nextjs example?
It looks like there are several instances of ‘styled-components’ initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason. See https://s-c.sh/2BAXzed for more info.
Steps to reproduce
- Create a new directory
- execute
npx create-next-app nextjs-blog --use-npm --example "https://github.com/vercel/next-learn/tree/master/basics/learn-starter" - cd nextjs-blog
- execute
npx @tinacms/cli@latest initand wait
Setting up Tina… Installing Tina packages. This might take a moment… ✅ Adding _app.js … ✅ Adding a content folder… ✅ Tina setup done ✅ Start your dev server with yarn tina-dev and go to http://localhost:3000/demo/blog/HelloWorld to check it out the page that was created for you Enjoy Tina 🦙 !
- execute
yarn tina-devand check your browser console at http://localhost:3000/
Expected result
I assume that we shouldn’t have issue with several instances of styled-components.
Actual result

Environment
Tinacms Package Versions
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"tina-dev": "yarn tinacms server:start -c \"next dev\"",
"tina-build": "yarn tinacms server:start -c \"next build\"",
"tina-start": "yarn tinacms server:start -c \"next start\""
},
"dependencies": {
"@tinacms/cli": "^0.57.2",
"next": "latest",
"react": "17.0.2",
"react-dom": "17.0.2",
"styled-components": "^5.3.3",
"tinacms": "^0.59.0"
}
}
Tools
| Tool | Version |
|---|---|
| Chrome | Version 96.0.4664.45 (64-bit) |
| os | Windows 10 Pro |
| node | 14.15.4 |
| npm | 6.14.10 |
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Related StackOverflow Question
This is a strange one, but we’re moving away from styled components for the rich text editor. I expect there are some oddities around how some of our dependencies in plate are loading styled-components. We’re confident that this isn’t manifesting in any actual bugs, just a false positive warning. @cjmcintyre bare with us as this might be a couple of weeks before this is fully refactored out.
@jeffsee55 Still seeing this