<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">Add <code class="notranslate">with-bunyan</code> example.</p>
<p dir="auto">I understand the main challenge is bunyan not work friendly with webpack.</p>
<p dir="auto">I have try one day full. Open this issus for some help.</p>
<h2 dir="auto">Current Behavior</h2>


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


<ol dir="auto">
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
<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</td>
</tr>
<tr>
<td>node</td>
<td>8</td>
</tr>
<tr>
<td>OS</td>
<td>OSX</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
<tr>
<td>etc</td>
<td></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.<br>
I've read:</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="233298693" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/2152" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/2152/hovercard" href="https://github.com/vercel/next.js/issues/2152">#2152</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="296433623" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/3778" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/3778/hovercard" href="https://github.com/vercel/next.js/issues/3778">#3778</a></li>
<li><a class="commit-link" href="https://github.com/vercel/next.js/commit/7b2cd84fee924cb5299635000d8067e3c16c7ccc#diff-bec864430eb5752a683c8798d0c6bd6c"><tt>7b2cd84</tt>#diff-bec864430eb5752a683c8798d0c6bd6c</a></li>
<li><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/vercel/next.js/commit/c210a2e/hovercard" href="https://github.com/vercel/next.js/commit/c210a2e"><tt>c210a2e</tt></a></li>
</ul>
<h2 dir="auto">Expected Behavior</h2>


<p dir="auto">No error on terminal.</p>
<h2 dir="auto">Current Behavior</h2>


<p dir="auto">Getting error on terminal for next <code class="notranslate">5.0.0</code>, <code class="notranslate">5.0.1-canary.8</code> <em>but not</em> <code class="notranslate">4.3.0-canary.1</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ Error: Can't set headers after they are sent.
    at SendStream.headersAlreadySent (/home/tima/apps/builderbook/book/4-end/node_modules/send/index.js:390:13)
    at SendStream.send (/home/tima/apps/builderbook/book/4-end/node_modules/send/index.js:618:10)
    at onstat (/home/tima/apps/builderbook/book/4-end/node_modules/send/index.js:730:10)
    at FSReqWrap.oncomplete (fs.js:153:5) expose: false, statusCode: 500, status: 500 }"><pre class="notranslate"><code class="notranslate">{ Error: Can't set headers after they are sent.
    at SendStream.headersAlreadySent (/home/tima/apps/builderbook/book/4-end/node_modules/send/index.js:390:13)
    at SendStream.send (/home/tima/apps/builderbook/book/4-end/node_modules/send/index.js:618:10)
    at onstat (/home/tima/apps/builderbook/book/4-end/node_modules/send/index.js:730:10)
    at FSReqWrap.oncomplete (fs.js:153:5) expose: false, statusCode: 500, status: 500 }
</code></pre></div>
<p dir="auto">I've read this issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="233298693" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/2152" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/2152/hovercard" href="https://github.com/vercel/next.js/issues/2152">#2152</a><br>
However I don't redirect inside <code class="notranslate">getInitialProps</code>.</p>
<p dir="auto">My app has express/next server.  <a href="https://github.com/builderbook/builderbook/tree/master/book/4-end">Link</a></p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>Start <a href="https://github.com/builderbook/builderbook/tree/master/book/4-end">app</a> with different versions of next <code class="notranslate">5.0.0</code>, <code class="notranslate">5.0.1-canary.8</code>, <code class="notranslate">4.3.0-canary.1</code></li>
<li>When app uses <code class="notranslate">5.0.0</code>, <code class="notranslate">5.0.1-canary.8</code> versions of next (but not  <code class="notranslate">4.3.0-canary.1</code>) then you see above error object in terminal</li>
</ol>