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

Error during Serverside Rendering #6

Open
ckeeney opened this issue Sep 12, 2018 · 1 comment
Open

Error during Serverside Rendering #6

ckeeney opened this issue Sep 12, 2018 · 1 comment

Comments

@ckeeney
Copy link

ckeeney commented Sep 12, 2018

I tried adding this to my next.js project. It works fine client side but server side I get the following error.

styleSheet.getName is not a function
TypeError: styleSheet.getName is not a function
    at ComponentStyle.generateAndInjectStyles (my-project/node_modules/react-css-grid/node_modules/styled-components/lib/models/ComponentStyle.js:95:37)

Hopefully this problem would go away after #5 is resolved, because I'm going to try styled-system next.

@jxnblk
Copy link
Owner

jxnblk commented Sep 13, 2018

styled-system will definitely work if you wanna go that route. For SSR with this package, make sure you have everything set up like here https://github.com/zeit/next.js/tree/canary/examples/with-styled-components

But, there might be an issue with styled-components being a hard dependency in this package

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

No branches or pull requests

2 participants