next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Styled Components Server Rendering - Create Context Error

Open nesbtesh opened this issue 3 years ago • 1 comments

Verify canary release

  • [X] I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 Binaries: Node: 16.13.1 npm: 8.1.2 Yarn: N/A pnpm: N/A Relevant packages: next: 13.0.0 eslint-config-next: 13.0.0 react: 18.2.0 react-dom: 18.2.0

What browser are you using? (if relevant)

Version 107.0.5304.87

How are you deploying your application? (if relevant)

No response

Describe the Bug

I am getting r.createContext is not a function with next 13. The issue appears when I use ThemeProvider with Styled Components server rendering.

Screen Shot 2022-10-30 at 9 47 59 AM

Expected Behavior

I expect server rendering to work properly with styled components theme provider. It works fine in previous versions of next js

Link to reproduction

N/A

To Reproduce

Screen Shot 2022-10-30 at 9 50 16 AM

nesbtesh avatar Oct 30 '22 14:10 nesbtesh

duplicate of https://github.com/vercel/next.js/issues/41958 .

kendhia avatar Oct 30 '22 17:10 kendhia

Indeed, a duplicate, please read https://github.com/vercel/next.js/issues/41958#issuecomment-1294063309

balazsorban44 avatar Oct 31 '22 17:10 balazsorban44

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

github-actions[bot] avatar Dec 01 '22 00:12 github-actions[bot]