<p dir="auto">I've updated Next from version 5 to 6 and on <code class="notranslate">build</code> I get:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: .plugins[4][1] must be an object, false, or undefined
    at assertPluginItem (/node_modules/@babel/core/lib/config/validation/option-assertions.js:157:15)
    at /node_modules/@babel/core/lib/config/validation/option-assertions.js:134:14
    at Array.forEach (&lt;anonymous&gt;)
    at assertPluginList (/node_modules/@babel/core/lib/config/validation/option-assertions.js:133:9)
    at /node_modules/@babel/core/lib/config/validation/options.js:84:20
    at Array.forEach (&lt;anonymous&gt;)
    at validate (/node_modules/@babel/core/lib/config/validation/options.js:62:21)
    at /node_modules/@babel/core/lib/config/config-chain.js:141:36
    at cachedFunction (/node_modules/@babel/core/lib/config/caching.js:40:17)
    at init (/node_modules/@babel/core/lib/config/config-chain.js:122:12)
    at /node_modules/@babel/core/lib/config/config-chain.js:206:17
    at buildRootChain (/node_modules/@babel/core/lib/config/config-chain.js:85:20)
    at loadPrivatePartialConfig (/node_modules/@babel/core/lib/config/partial.js:41:53)
    at loadPartialConfig (/node_modules/@babel/core/lib/config/partial.js:66:16)
    at babelConfig (/node_modules/next/dist/server/build/webpack.js:88:57)
    at _callee2$ (/node_modules/next/dist/server/build/webpack.js:164:34)"><pre class="notranslate"><code class="notranslate">Error: .plugins[4][1] must be an object, false, or undefined
    at assertPluginItem (/node_modules/@babel/core/lib/config/validation/option-assertions.js:157:15)
    at /node_modules/@babel/core/lib/config/validation/option-assertions.js:134:14
    at Array.forEach (&lt;anonymous&gt;)
    at assertPluginList (/node_modules/@babel/core/lib/config/validation/option-assertions.js:133:9)
    at /node_modules/@babel/core/lib/config/validation/options.js:84:20
    at Array.forEach (&lt;anonymous&gt;)
    at validate (/node_modules/@babel/core/lib/config/validation/options.js:62:21)
    at /node_modules/@babel/core/lib/config/config-chain.js:141:36
    at cachedFunction (/node_modules/@babel/core/lib/config/caching.js:40:17)
    at init (/node_modules/@babel/core/lib/config/config-chain.js:122:12)
    at /node_modules/@babel/core/lib/config/config-chain.js:206:17
    at buildRootChain (/node_modules/@babel/core/lib/config/config-chain.js:85:20)
    at loadPrivatePartialConfig (/node_modules/@babel/core/lib/config/partial.js:41:53)
    at loadPartialConfig (/node_modules/@babel/core/lib/config/partial.js:66:16)
    at babelConfig (/node_modules/next/dist/server/build/webpack.js:88:57)
    at _callee2$ (/node_modules/next/dist/server/build/webpack.js:164:34)
</code></pre></div>
<p dir="auto">My babel deps are:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    &quot;babel-eslint&quot;: &quot;^8.2.3&quot;,
    &quot;babel-plugin-inline-react-svg&quot;: &quot;^0.5.2&quot;,
    &quot;babel-plugin-transform-class-properties&quot;: &quot;^6.24.1&quot;,
    &quot;babel-plugin-transform-decorators-legacy&quot;: &quot;^1.3.4&quot;,
    &quot;babel-preset-env&quot;: &quot;^1.6.1&quot;,
    &quot;babel-root-import&quot;: &quot;^4.1.8&quot;,
    &quot;markdown-in-js&quot;: &quot;1.1.4&quot;,"><pre class="notranslate"><code class="notranslate">    "babel-eslint": "^8.2.3",
    "babel-plugin-inline-react-svg": "^0.5.2",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-preset-env": "^1.6.1",
    "babel-root-import": "^4.1.8",
    "markdown-in-js": "1.1.4",
</code></pre></div>
<blockquote>
<p dir="auto">.babelrc</p>
</blockquote>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;presets&quot;: [
    &quot;env&quot;,
    &quot;next/babel&quot;
  ],
  &quot;plugins&quot;: [
    &quot;markdown-in-js/babel&quot;,
    &quot;inline-react-svg&quot;,
    &quot;transform-decorators-legacy&quot;,
    &quot;transform-class-properties&quot;,
    [&quot;babel-root-import&quot;, [{
      &quot;rootPathPrefix&quot;: &quot;~&quot;,
      &quot;rootPathSuffix&quot;: &quot;.&quot;
    }, {
      &quot;rootPathPrefix&quot;: &quot;$&quot;,
      &quot;rootPathSuffix&quot;: &quot;app&quot;
    }, {
      &quot;rootPathPrefix&quot;: &quot;#&quot;,
      &quot;rootPathSuffix&quot;: &quot;shared&quot;
    }]]
  ]
}
"><pre class="notranslate"><code class="notranslate">{
  "presets": [
    "env",
    "next/babel"
  ],
  "plugins": [
    "markdown-in-js/babel",
    "inline-react-svg",
    "transform-decorators-legacy",
    "transform-class-properties",
    ["babel-root-import", [{
      "rootPathPrefix": "~",
      "rootPathSuffix": "."
    }, {
      "rootPathPrefix": "$",
      "rootPathSuffix": "app"
    }, {
      "rootPathPrefix": "#",
      "rootPathSuffix": "shared"
    }]]
  ]
}

</code></pre></div>
<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>6</td>
</tr>
<tr>
<td>node</td>
<td>v8.9.3</td>
</tr>
<tr>
<td>OS</td>
<td>macOS H.S.</td>
</tr>
</tbody>
</table>
<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">When encountering an internal server error, it's expected that the server rendered markup matches the clients, thus avoiding flashing content.</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">Currently internal server errors will cause a flash. More explicitly, the <code class="notranslate">statusCode</code> prop isn't present when rendering <code class="notranslate">_error.js</code> in the client, causing the markup to differ.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>Setup a simple Next.js project.</li>
<li>Add a page <code class="notranslate">pages/500.js</code> with the following content:</li>
</ol>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export default () =&gt; { throw new Error('Boom!') }"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">'Boom!'</span><span class="pl-kos">)</span> <span class="pl-kos">}</span></pre></div>
<ol start="3" dir="auto">
<li><code class="notranslate">next build &amp;&amp; next start</code></li>
<li>Point a browser to <code class="notranslate">http://localhost:3000/500</code>.</li>
</ol>
<h2 dir="auto">Context</h2>


<p dir="auto">When deploying an application to production, internal server errors cause an unwanted flash of content.</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>v5.0.1-canary.7</td>
</tr>
<tr>
<td>node</td>
<td>v9.4.0</td>
</tr>
<tr>
<td>OS</td>
<td>macOS v10.13.3</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome v64</td>
</tr>
</tbody>
</table>