<p dir="auto">Trying out styled-jsx-postcss with the plugin postcss-cssnext - when I nest, I get an erro: node.parent.after is not a function</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">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>

<p dir="auto">The nested css should work</p>

<h2 dir="auto">Current Behavior</h2>

<p dir="auto">When I save I get this error:</p>
<blockquote>
<p dir="auto">Error in /home/nick/dev/Projects/FreeAdvancedMarketing/pages/index.js?entry<br>
Module build failed: TypeError: /home/nick/dev/Projects/FreeAdvancedMarketing/pages/index.js?entry: node.parent.after is not a function<br>
at module.exports (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/postcss-nesting/lib/transform-nesting-rule.js:18:29)<br>
at walk (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/postcss-nesting/index.js:25:3)<br>
at walk (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/postcss-nesting/index.js:33:4)<br>
at walk (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/postcss-nesting/index.js:33:4)<br>
at LazyResult.run (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/styled-jsx-postcss/node_modules/postcss/lib/lazy-result.es6:321:20)<br>
at LazyResult.asyncTick (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/styled-jsx-postcss/node_modules/postcss/lib/lazy-result.es6:248:32)<br>
at LazyResult.asyncTick (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/styled-jsx-postcss/node_modules/postcss/lib/lazy-result.es6:260:22)<br>
at LazyResult.asyncTick (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/styled-jsx-postcss/node_modules/postcss/lib/lazy-result.es6:260:22)<br>
at LazyResult.asyncTick (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/styled-jsx-postcss/node_modules/postcss/lib/lazy-result.es6:260:22)<br>
at LazyResult.asyncTick (/home/nick/dev/Projects/FreeAdvancedMarketing/node_modules/styled-jsx-postcss/node_modules/postcss/lib/lazy-result.es6:260:22)</p>
</blockquote>

<h2 dir="auto">Steps to Reproduce (for bugs)</h2>

<p dir="auto"><a href="https://github.com/Nick-vr/FreeAdvancedMarketing">https://github.com/Nick-vr/FreeAdvancedMarketing</a></p>

<ol dir="auto">
<li>clone</li>
<li>yarn</li>
<li>yarn dev</li>
</ol>
<h2 dir="auto">Context</h2>

<p dir="auto">I am trying to nest css with styled-jsx-postcss  -&gt; cssnext</p>

<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>beta</td>
</tr>
<tr>
<td>node</td>
<td>v7.4.0</td>
</tr>
<tr>
<td>OS</td>
<td>Linux Mint</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>
<p dir="auto">Currently attempting to deploy a next.js to production with dynamic imports (without using <code class="notranslate">next/dynamic</code> since we're importing a non-react library), and running into issues with 404s on the dynamically imported chunks.</p>
<p dir="auto">The built folder structure looks like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".next
	- app.js
	- BUILD_ID
	- 0-cd29260af35981b4adfc.js
	- ...etc
	"><pre class="notranslate"><code class="notranslate">.next
	- app.js
	- BUILD_ID
	- 0-cd29260af35981b4adfc.js
	- ...etc
	
</code></pre></div>
<p dir="auto">While loading the page, a javascript file at <code class="notranslate">/_next/webpack/0-cd29260af35981b4adfc.js</code> is loaded, pointing to the file <code class="notranslate">0-cd29260af35981b4adfc.js</code> to be in the <code class="notranslate">.next/chunks</code> directory, which it's not. Moving that file manually to the <code class="notranslate">chunks</code> folder fixes it. Currently, the request <code class="notranslate">404s</code>.</p>


<ul dir="auto">
<li>[x ] 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">The request for the dynamically loaded javascript file should not 404.</p>
<h2 dir="auto">Current Behavior</h2>

<p dir="auto">The request for the dynamically loaded javascript <code class="notranslate">404s</code>.</p>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>5.0.0</td>
</tr>
<tr>
<td>node</td>
<td>8.9.4</td>
</tr>
<tr>
<td>OS</td>
<td>MacOs</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
<tr>
<td>etc</td>
<td></td>
</tr>
</tbody>
</table>