<p dir="auto">The with-sw-precache example is broken. The generated service-worker tries to fetch files that aren't there:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5004390/34733219-e99f6cbe-f567-11e7-82aa-b85b0de504c5.png"><img src="https://user-images.githubusercontent.com/5004390/34733219-e99f6cbe-f567-11e7-82aa-b85b0de504c5.png" alt="image" style="max-width: 100%;"></a></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">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Generated service-worker should fetch the assets app.js, _error.js and index.js in the with-sw-precache example.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Generated service-worker should only try to fetch the above ressources.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Clone <a href="https://github.com/zeit/next.js/tree/canary/examples/with-sw-precache">with-sw-precache</a></li>
<li>npm install</li>
<li>npm run build</li>
<li>npm start</li>
<li>Check the network tab</li>
</ol>
<p dir="auto">Next.js fails to compile whenever a module is linked locally using <a href="https://yarnpkg.com/en/docs/cli/link" rel="nofollow"><code class="notranslate">yarn link</code></a>. This is a reissue of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="209442492" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/1244" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/1244/hovercard" href="https://github.com/vercel/next.js/issues/1244">#1244</a>.</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">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">Next.js successfully imports dependencies that are linked via yarn/npm.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Next.js fails to import linked dependencies and fails to compile.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="yarn run v1.3.2
$ next
Error: Cannot find module 'lodash'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.&lt;anonymous&gt; (/Users/username/Sites/oss/nextjs-linked-module/node_modules/write-file-webpack-plugin/src/index.js:6:1)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.&lt;anonymous&gt; (/Users/username/Sites/oss/nextjs-linked-module/node_modules/next/dist/server/build/webpack.js:55:31)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command."><pre class="notranslate"><code class="notranslate">yarn run v1.3.2
$ next
Error: Cannot find module 'lodash'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.&lt;anonymous&gt; (/Users/username/Sites/oss/nextjs-linked-module/node_modules/write-file-webpack-plugin/src/index.js:6:1)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.&lt;anonymous&gt; (/Users/username/Sites/oss/nextjs-linked-module/node_modules/next/dist/server/build/webpack.js:55:31)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
</code></pre></div>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Clone <a href="https://github.com/lodash/lodash"><code class="notranslate">lodash</code></a>.</li>
<li>Link <code class="notranslate">lodash</code> via <code class="notranslate">cd path/to/lodash &amp;&amp; yarn link</code>.</li>
<li>Clone <a href="https://github.com/dcalhoun/nextjs-linked-module">linked module test case</a> in a separate location.</li>
<li>Link <code class="notranslate">lodash</code> for the test case via <code class="notranslate">cd path/to/nextjs-linked-module &amp;&amp; yarn install &amp;&amp; yarn link lodash</code>.</li>
<li><code class="notranslate">yarn start</code></li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">I need to have a local module linked so that I may actively develop it and have a Next.js project utilize the local module.</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>5.0.1-canary.2</td>
</tr>
<tr>
<td>node</td>
<td>8.9.4</td>
</tr>
<tr>
<td>OS</td>
<td>macOS 10.13.1</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome 64.0.3282.167</td>
</tr>
</tbody>
</table>