Cannot create styled-component for component: undefined

See original GitHub issue

Description

By just following GitHub Backend tutorial, it produces this error:

Cannot create styled-component for component: undefined

Steps to reproduce

Here is the GitHub project. Its basically what you get when you follow “GitHub” backend tutorial.

These are important dependancies:

"next": "11.0.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"tinacms": "^0.42.1",
"react-tinacms-github": "^0.42.1",
"next-tinacms-github": "^0.42.1",
"sass": "^1.35.1",
"styled-components": "^5.3.0"

Environment

Tinacms Package Versions

├── UNMET PEER DEPENDENCY @tinacms/core@^0.29.0
├── UNMET PEER DEPENDENCY @tinacms/fields@^0.29.0
├── next-tinacms-github@0.42.1
├── react-tinacms-github@0.42.1
├── tinacms@0.42.1

Tools

Tool Version
browser Safari
os Mac
node v14.15.1
npm 6.14.8

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
Enigmaticalcommented, Jul 15, 2021

More, hopefully, good news 😃

I believe I’ve found the issue with the render method of the AsyncButton and I’ve merged the fix: https://github.com/tinacms/tina-graphql-gateway/pull/355

The fix is up on the beta channel for tina-graphql-gateway.

2reactions
Enigmaticalcommented, Jul 14, 2021

Hopefully good news 😄

I’ve identified another dependency issue that appears to fix the styled-component problem: https://github.com/tinacms/tinacms/pull/1875

It has been released on the next channel, so you can use:

npm install react-tinacms-inline@next react-tinacms-editor@next

-or-

yarn add react-tinacms-inline@next react-tinacms-editor@next

Crossing my fingers that this takes care of the problems listed here 👍 If it does, we’ll make the fix part of the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught Error: Cannot create styled-component for ... - GitHub
I'm getting this type of error with a very simple component: Uncaught Error: Cannot create styled-component for component: undefined at ...
Read more >
Jest - `Cannot create styled-component for ... - Stack Overflow
I'm running into the following error when testing my application using jest : FAIL ○ Test suite failed to run Cannot create styled-component...
Read more >
cannot create styled-component for component: undefined.
I get the Cannot create styled-component for component: undefined error when I try to instantiate the ServerStyleSheet but it works fine without it....
Read more >
API Reference - styled-components
This is a low-level factory we use to create the styled.tagname helper methods ... Functions will receive the styled component's props as the...
Read more >
jest-styled-components - npm
Jest utilities for Styled Components. Latest version: 7.1.1, last published: 4 months ago. Start using jest-styled-components in your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found