<p dir="auto">React-i18n in Production</p>


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

<p dir="auto">I'm struggling with a very strange bug on running the react-i18next with nextJS, it works perfectly on dev, but when I run it on production mode it crashes. The strange thing is that I created the configs based on the examples that are provided here, but it doesn't work on production mode, as doesn't find react under the i18n options object.</p>

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

<p dir="auto">On production I get this error the front-end</p>
<p dir="auto">app.js:78 Cannot read property 'react' of undefined<br>
TypeError: Cannot read property 'react' of undefined<br>
at new l (<a href="http://localhost:3000/_next/65dbc4ba-ad42-4d43-b7bc-3bc411c9d184/page/:3:1740" rel="nofollow">http://localhost:3000/_next/65dbc4ba-ad42-4d43-b7bc-3bc411c9d184/page/:3:1740</a>)<br>
at d._constructComponentWithoutOwner (<a href="http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:341292" rel="nofollow">http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:341292</a>)<br>
at d._constructComponent (<a href="http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:341159" rel="nofollow">http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:341159</a>)<br>
at d.mountComponent (<a href="http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:340341" rel="nofollow">http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:340341</a>)<br>
at Object.mountComponent (<a href="http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:7:67596" rel="nofollow">http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:7:67596</a>)<br>
at d.performInitialMount (<a href="http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:342114" rel="nofollow">http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:342114</a>)<br>
at d.mountComponent (<a href="http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:341000" rel="nofollow">http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:341000</a>)<br>
at Object.mountComponent (<a href="http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:7:67596" rel="nofollow">http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:7:67596</a>)<br>
at mountChildren (<a href="http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:336860" rel="nofollow">http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:336860</a>)<br>
at m._createContentMarkup (<a href="http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:325835" rel="nofollow">http://localhost:3000/_next/2ff3a5285f98c6920205133b0780e5fc/app.js:35:325835</a>)</p>

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


<p dir="auto">1.next build<br>
2.npm start</p>
<h2 dir="auto">Context</h2>


<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>^3.0.1-beta.18</td>
</tr>
<tr>
<td>OS</td>
<td>MAC OS</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
</tbody>
</table>
<h1 dir="auto">Bug report</h1>
<p dir="auto">There are duplicate chunks for the <code class="notranslate">robot-bundle</code> component. The component is lazy loaded with <code class="notranslate">SSR: false</code>.</p>
<p dir="auto">This is the section of the react-loadable-manifest.json. You can see that <code class="notranslate">0zX2</code>, <code class="notranslate">3at2</code> are duplicated.</p>
<p dir="auto">Is that correct or what's the reason for this? <em><strong>There are also two chunks for the <code class="notranslate">robot-bundle</code> component on client side</strong></em> even though it's exactly the same component.</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="  &quot;../../components/robot-bundle&quot;: [
    {
      &quot;id&quot;: &quot;&quot;,
      &quot;name&quot;: null,
      &quot;file&quot;: &quot;static/chunks/styles.7bcfa32fbdfd22ad0da9.js&quot;,
      &quot;publicPath&quot;: &quot;static/chunks/styles.7bcfa32fbdfd22ad0da9.js&quot;
    },
    {
      &quot;id&quot;: &quot;0zX2&quot;,
      &quot;name&quot;: &quot;../../node_modules/axios/lib/helpers/isURLSameOrigin.js&quot;,
      &quot;file&quot;: &quot;static/chunks/9c13.c708e85ffab23caa575e.js&quot;,
      &quot;publicPath&quot;: &quot;static/chunks/9c13.c708e85ffab23caa575e.js&quot;
    },
    {
      &quot;id&quot;: &quot;3at2&quot;,
      &quot;name&quot;: &quot;../../node_modules/react-feather/dist/icons/eye.js&quot;,
      &quot;file&quot;: &quot;static/chunks/9a93.ce32de670ed7dbc20850.js&quot;,
      &quot;publicPath&quot;: &quot;static/chunks/9a93.ce32de670ed7dbc20850.js&quot;
    },
    {
      &quot;id&quot;: &quot;3at2&quot;,
      &quot;name&quot;: &quot;../../node_modules/react-feather/dist/icons/eye.js&quot;,
      &quot;file&quot;: &quot;static/chunks/0430.1e2bbca5ac8a0d8676d8.js&quot;,
      &quot;publicPath&quot;: &quot;static/chunks/0430.1e2bbca5ac8a0d8676d8.js&quot;
    },
    {
      &quot;id&quot;: &quot;0zX2&quot;,
      &quot;name&quot;: &quot;../../node_modules/axios/lib/helpers/isURLSameOrigin.js&quot;,
      &quot;file&quot;: &quot;static/chunks/c2a8.27def4aa4c3e39bcd218.js&quot;,
      &quot;publicPath&quot;: &quot;static/chunks/c2a8.27def4aa4c3e39bcd218.js&quot;
    }
  ],"><pre class="notranslate">  <span class="pl-ent">"../../components/robot-bundle"</span>: [
    {
      <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>,
      <span class="pl-ent">"name"</span>: <span class="pl-c1">null</span>,
      <span class="pl-ent">"file"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/styles.7bcfa32fbdfd22ad0da9.js<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"publicPath"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/styles.7bcfa32fbdfd22ad0da9.js<span class="pl-pds">"</span></span>
    },
    {
      <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>0zX2<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>../../node_modules/axios/lib/helpers/isURLSameOrigin.js<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"file"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/9c13.c708e85ffab23caa575e.js<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"publicPath"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/9c13.c708e85ffab23caa575e.js<span class="pl-pds">"</span></span>
    },
    {
      <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>3at2<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>../../node_modules/react-feather/dist/icons/eye.js<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"file"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/9a93.ce32de670ed7dbc20850.js<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"publicPath"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/9a93.ce32de670ed7dbc20850.js<span class="pl-pds">"</span></span>
    },
    {
      <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>3at2<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>../../node_modules/react-feather/dist/icons/eye.js<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"file"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/0430.1e2bbca5ac8a0d8676d8.js<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"publicPath"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/0430.1e2bbca5ac8a0d8676d8.js<span class="pl-pds">"</span></span>
    },
    {
      <span class="pl-ent">"id"</span>: <span class="pl-s"><span class="pl-pds">"</span>0zX2<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>../../node_modules/axios/lib/helpers/isURLSameOrigin.js<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"file"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/c2a8.27def4aa4c3e39bcd218.js<span class="pl-pds">"</span></span>,
      <span class="pl-ent">"publicPath"</span>: <span class="pl-s"><span class="pl-pds">"</span>static/chunks/c2a8.27def4aa4c3e39bcd218.js<span class="pl-pds">"</span></span>
    }
  ],</pre></div>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">From my understanding I expect that there is only one chunk.</p>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Ubuntu</li>
<li>Version of Next.js: 8.1.0</li>
</ul>