<p dir="auto">I am building react js app based on nextjs boilerplate.</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>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Check if router has previous url or not.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The tab is being closed on router.back()</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<p dir="auto">router.back()</p>
<h2 dir="auto">Context</h2>
<p dir="auto">I need to get the previous url to redirect the user back to the page after signin in my app. It works fine if there is any other page visited before the signin page. But when user directly open signin page in new tab, there will be no previous url. So in router.back() it closes the tab.</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>^3.2.2</td>
</tr>
<tr>
<td>node</td>
<td>9.4.0</td>
</tr>
<tr>
<td>OS</td>
<td>MacOS Sierra 10.12.6</td>
</tr>
<tr>
<td>browser</td>
<td>Google Chrome Version 65.0.3325.181</td>
</tr>
</tbody>
</table>
<h1 dir="auto">Examples bug report</h1>
<h2 dir="auto">Example name</h2>
<p dir="auto">Lazy Loading Modules<br>
<a href="https://github.com/zeit/next-learn-demo.git">https://github.com/zeit/next-learn-demo.git</a><br>
Step : E2-lazy-loading-modules</p>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">npm run dev causes runtime issues and the server does not start. Faces the same issue with E3 as well.<br>
I am using Windows 10 for the tutorials</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:<br>
<code class="notranslate">npm install</code><br>
<code class="notranslate">npm run dev</code></p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">The app starts on port 3000</p>
<h2 dir="auto">Screenshots</h2>
<p dir="auto">If applicable, add screenshots to help explain your problem.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="C:\workspace\next-learn-demo\E2-lazy-loading-modules&gt;npm run dev

&gt; hello-next@1.0.0 dev C:\workspace\next-learn-demo\E2-lazy-loading-modules
&gt; node server.js

[ error ] ./node_modules/next/dist/client/next-dev.js 36:6
Module parse failed: Unexpected token (36:6)
You may need an appropriate loader to handle this file type.
|
|
&gt; import('./noop'); // Support EventSource on Internet Explorer 11
|
| if (!window.EventSource) {
&gt; Ready on http://localhost:3000
TypeError: Cannot read property 'issuer' of null
    at findEntryModule (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:60:16)
    at erroredPages (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:68:29)
    at HotReloader.getCompilationErrors (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:308:33)
    at process._tickCallback (internal/process/next_tick.js:68:7)
TypeError: Cannot read property 'issuer' of null
    at findEntryModule (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:60:16)
    at erroredPages (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:68:29)
    at HotReloader.getCompilationErrors (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:308:33)
    at process._tickCallback (internal/process/next_tick.js:68:7)"><pre class="notranslate"><code class="notranslate">C:\workspace\next-learn-demo\E2-lazy-loading-modules&gt;npm run dev

&gt; hello-next@1.0.0 dev C:\workspace\next-learn-demo\E2-lazy-loading-modules
&gt; node server.js

[ error ] ./node_modules/next/dist/client/next-dev.js 36:6
Module parse failed: Unexpected token (36:6)
You may need an appropriate loader to handle this file type.
|
|
&gt; import('./noop'); // Support EventSource on Internet Explorer 11
|
| if (!window.EventSource) {
&gt; Ready on http://localhost:3000
TypeError: Cannot read property 'issuer' of null
    at findEntryModule (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:60:16)
    at erroredPages (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:68:29)
    at HotReloader.getCompilationErrors (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:308:33)
    at process._tickCallback (internal/process/next_tick.js:68:7)
TypeError: Cannot read property 'issuer' of null
    at findEntryModule (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:60:16)
    at erroredPages (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:68:29)
    at HotReloader.getCompilationErrors (C:\workspace\next-learn-demo\E2-lazy-loading-modules\node_modules\next\dist\server\hot-reloader.js:308:33)
    at process._tickCallback (internal/process/next_tick.js:68:7)
</code></pre></div>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: Windows 10</li>
<li>Version of Next.js: 8.0.3 (<a href="https://github.com/zeit/next-learn-demo.git">https://github.com/zeit/next-learn-demo.git</a>)</li>
</ul>
<h2 dir="auto">Additional context</h2>
<p dir="auto">The same issue is in the E3 example as well and cannot proceed further in the tutorial.</p>