<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">I should be able to use the package <a href="https://github.com/request/request">request</a> without crashes.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">The server crashes when I import the package.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11896398/34912646-ea691122-f8cd-11e7-9d90-d770a3240f84.png"><img src="https://user-images.githubusercontent.com/11896398/34912646-ea691122-f8cd-11e7-9d90-d770a3240f84.png" alt="image" style="max-width: 100%;"></a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="These dependencies were not found:

* fs in ./node_modules/needle/lib/needle.js, ./node_modules/needle/lib/multipart.js and 1 other
* net in ./node_modules/forever-agent/index.js, ./node_modules/tough-cookie/lib/cookie.js and 1 other
* tls in ./node_modules/forever-agent/index.js, ./node_modules/tunnel-agent/index.js

To install them, you can run: npm install --save fs net tls"><pre class="notranslate"><code class="notranslate">These dependencies were not found:

* fs in ./node_modules/needle/lib/needle.js, ./node_modules/needle/lib/multipart.js and 1 other
* net in ./node_modules/forever-agent/index.js, ./node_modules/tough-cookie/lib/cookie.js and 1 other
* tls in ./node_modules/forever-agent/index.js, ./node_modules/tunnel-agent/index.js

To install them, you can run: npm install --save fs net tls
</code></pre></div>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Get a next.js project running (I've utilized the <a href="https://github.com/zeit/next.js/tree/canary/examples/basic-css">Basic CSS Exaple</a>)</li>
<li>Add the package with <code class="notranslate">npm install request</code></li>
<li>Import the package anywhere with <code class="notranslate">import request from 'request'</code></li>
<li>Try to run, the server crashes as soon as it reaches the import.</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">I am just trying to create a POST request to an API.</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>v4.2.3</td>
</tr>
<tr>
<td>node</td>
<td>v8.1.3</td>
</tr>
<tr>
<td>OS</td>
<td>Ubuntu 16.04.3 LTS</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 62.0.3202.89</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>
<p dir="auto">I've been following the <a href="https://github.com/zeit/next.js/tree/master/examples/with-redux-saga">https://github.com/zeit/next.js/tree/master/examples/with-redux-saga</a> example and noticed when I change the code in the saga files, the app is hot-reloaded, although not the saga files. The new saga code starts working after F5 reload.</p>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">When saga files changed, the changes are propagated with the rest of the app and replaced the existing saga code.</p>
<h2 dir="auto">Current Behavior</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="client.js?3cc2700:199 [HMR] bundle rebuilding
client.js?3cc2700:207 [HMR] bundle rebuilt in 439ms
process-update.js?3cc2700:27 [HMR] Checking for updates on the server...
process-update.js?3cc2700:100 [HMR] Updated modules:
process-update.js?3cc2700:102 [HMR]  - ./saga.js
process-update.js?3cc2700:102 [HMR]  - ./store.js
process-update.js?3cc2700:102 [HMR]  - ./pages?entry
process-update.js?3cc2700:107 [HMR] App is up to date."><pre class="notranslate"><code class="notranslate">client.js?3cc2700:199 [HMR] bundle rebuilding
client.js?3cc2700:207 [HMR] bundle rebuilt in 439ms
process-update.js?3cc2700:27 [HMR] Checking for updates on the server...
process-update.js?3cc2700:100 [HMR] Updated modules:
process-update.js?3cc2700:102 [HMR]  - ./saga.js
process-update.js?3cc2700:102 [HMR]  - ./store.js
process-update.js?3cc2700:102 [HMR]  - ./pages?entry
process-update.js?3cc2700:107 [HMR] App is up to date.
</code></pre></div>
<p dir="auto">But saga code is still the former one, until next server render.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>clone the with-redux-saga example</li>
<li>Run with <code class="notranslate">next</code></li>
<li>Add some changes, e.g. console.log at the saga beginning <a href="https://github.com/zeit/next.js/blob/master/examples/with-redux-saga/saga.js#L31">https://github.com/zeit/next.js/blob/master/examples/with-redux-saga/saga.js#L31</a></li>
<li>save, watch the code replace, but not the saga.</li>
</ol>
<p dir="auto">Is this even possible? The saga file is executed after change, but the saga code in the generators does not.</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>v3.2.1</td>
</tr>
<tr>
<td>node</td>
<td>v5.12.0</td>
</tr>
<tr>
<td>OS</td>
<td>Windows 10 x64</td>
</tr>
<tr>
<td>browser</td>
<td>Google Chrome, Version 60.0.3112.113 (Official Build) (64-bit)</td>
</tr>
</tbody>
</table>