<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Using the code from the <a href="https://github.com/zeit/next.js/tree/master/examples/with-styled-components">example for styled-components</a> should not remove the support of SSR of styled-jsx.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">When using the code from the <a href="https://github.com/zeit/next.js/tree/master/examples/with-styled-components">example</a> SSR of styled-jsx stop working.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Use <code class="notranslate">_document.js</code> from the <a href="https://github.com/zeit/next.js/tree/master/examples/with-styled-components">example</a>.</li>
<li>Write a page that uses styled-jsx styles.</li>
<li>Fetch the page source from NextJS server - there is no style tags from styled-jsx.</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">Application that uses both styled-components and styled-jsx (weird use case, but we did this because styled-components didn't work for us in one situation...).</p>
<h2 dir="auto">Root cause</h2>
<p dir="auto"><code class="notranslate">flush()</code> method from <code class="notranslate">styled-jsx/server</code> is not called in <code class="notranslate">getInitialProps</code> method in <code class="notranslate">_document.js</code></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<p dir="auto">Been trying to figure out if this is possible. I following try this repo setup &gt;&gt; <a href="https://github.com/ooade/next-react-toolbox">https://github.com/ooade/next-react-toolbox</a>. Seem okay until i try the <code class="notranslate">next export</code> then I run into following error &gt;&gt;&gt;</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(function (exports, require, module, __filename, __dirname) { :root {
                                                                                                       ^
SyntaxError: Unexpected token :
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.&lt;anonymous&gt; (../../../../../../index.js:20:14)```

Tried `[next-css](https://github.com/zeit/next-plugins/tree/master/packages/next-css)` 

## Your Environment
|---------|---------|
| next    |  5.1    |
| node    |   v8.10.0      |

any helper is helpful."><pre class="notranslate"><code class="notranslate">(function (exports, require, module, __filename, __dirname) { :root {
                                                                                                       ^
SyntaxError: Unexpected token :
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.&lt;anonymous&gt; (../../../../../../index.js:20:14)```

Tried `[next-css](https://github.com/zeit/next-plugins/tree/master/packages/next-css)` 

## Your Environment
|---------|---------|
| next    |  5.1    |
| node    |   v8.10.0      |

any helper is helpful.
</code></pre></div>