<p dir="auto">I'm deploying a project of mine to Heroku (which appear to be copying the project from a directory in which it is built before starting it). This causes issues with Next.js <code class="notranslate">5.0.0</code>, which appear to output absolute paths. This can be confirmed by going through the sources.</p>
<p dir="auto">This was not an issue with <code class="notranslate">4.2.3</code>.</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">As the default behaviour (and I'm not sure that it can be controlled) on at least Heroku seem to be to build in one directory and run the build in another, I would expect a build to not contain absolute paths.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">I can see, for instance in <code class="notranslate">dist/bundles/pages/_document.js</code>, that absolute paths are being generated.<br>
An example of an error (not in the test repository) is</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Error: Cannot find module '/tmp/build_&lt;id&gt;/eweilow-nextjs-deploy-test-&lt;buildId&gt;/node_modules/next/dist/pages/_document.js'
  at Function.Module._resolveFilename (module.js:555:15)
  at Function.Module._load (module.js:482:25)
  at Module.require (module.js:604:17)
  at require (internal/module.js:11:18)
  at Object.6 (/app/.next/dist/bundles/pages/_document.js:86:18)
  at __webpack_require__ (/app/.next/dist/bundles/pages/_document.js:23:31)
  at Object.5 (/app/.next/dist/bundles/pages/_document.js:78:18)
  at __webpack_require__ (/app/.next/dist/bundles/pages/_document.js:23:31)
  at /app/.next/dist/bundles/pages/_document.js:70:18
  at Object.&lt;anonymous&gt; (/app/.next/dist/bundles/pages/_document.js:73:10) code: 'MODULE_NOT_FOUND'"><pre class="notranslate">Error: <span class="pl-v">Cannot</span> <span class="pl-s1">find</span> <span class="pl-smi">module</span> <span class="pl-s">'/tmp/build_&lt;id&gt;/eweilow-nextjs-deploy-test-&lt;buildId&gt;/node_modules/next/dist/pages/_document.js'</span>
  <span class="pl-s1">at</span> <span class="pl-v">Function</span><span class="pl-kos">.</span><span class="pl-c1">Module</span><span class="pl-kos">.</span><span class="pl-en">_resolveFilename</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">555</span>:<span class="pl-c1">15</span><span class="pl-kos">)</span>
  <span class="pl-s1">at</span> <span class="pl-v">Function</span><span class="pl-kos">.</span><span class="pl-c1">Module</span><span class="pl-kos">.</span><span class="pl-en">_load</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">482</span>:<span class="pl-c1">25</span><span class="pl-kos">)</span>
  <span class="pl-s1">at</span> <span class="pl-v">Module</span><span class="pl-kos">.</span><span class="pl-en">require</span> <span class="pl-kos">(</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">604</span>:<span class="pl-c1">17</span><span class="pl-kos">)</span>
  <span class="pl-en">at</span> <span class="pl-en">require</span> <span class="pl-kos">(</span><span class="pl-s1">internal</span><span class="pl-c1">/</span><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">11</span>:<span class="pl-c1">18</span><span class="pl-kos">)</span>
  <span class="pl-en">at</span> <span class="pl-v">Object</span><span class="pl-c1">.6</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>app<span class="pl-c1">/</span></span><span class="pl-kos">.</span><span class="pl-c1">next</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">/</span><span class="pl-s1">bundles</span><span class="pl-c1">/</span><span class="pl-s1">pages</span><span class="pl-c1">/</span><span class="pl-s1">_document</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">86</span>:<span class="pl-c1">18</span><span class="pl-kos">)</span>
  <span class="pl-s1">at</span><span class="pl-kos"></span> <span class="pl-en">__webpack_require__</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>app<span class="pl-c1">/</span></span><span class="pl-kos">.</span><span class="pl-c1">next</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">/</span><span class="pl-s1">bundles</span><span class="pl-c1">/</span><span class="pl-s1">pages</span><span class="pl-c1">/</span><span class="pl-s1">_document</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">23</span>:<span class="pl-c1">31</span><span class="pl-kos">)</span>
  <span class="pl-en">at</span> <span class="pl-v">Object</span><span class="pl-c1">.5</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>app<span class="pl-c1">/</span></span><span class="pl-kos">.</span><span class="pl-c1">next</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">/</span><span class="pl-s1">bundles</span><span class="pl-c1">/</span><span class="pl-s1">pages</span><span class="pl-c1">/</span><span class="pl-s1">_document</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">78</span>:<span class="pl-c1">18</span><span class="pl-kos">)</span>
  <span class="pl-s1">at</span><span class="pl-kos"></span> <span class="pl-en">__webpack_require__</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>app<span class="pl-c1">/</span></span><span class="pl-kos">.</span><span class="pl-c1">next</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">/</span><span class="pl-s1">bundles</span><span class="pl-c1">/</span><span class="pl-s1">pages</span><span class="pl-c1">/</span><span class="pl-s1">_document</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">23</span>:<span class="pl-c1">31</span><span class="pl-kos">)</span>
  <span class="pl-s1">at</span> <span class="pl-c1">/</span><span class="pl-s1">app</span><span class="pl-c1">/</span><span class="pl-kos">.</span><span class="pl-c1">next</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">/</span><span class="pl-s1">bundles</span><span class="pl-c1">/</span><span class="pl-s1">pages</span><span class="pl-c1">/</span><span class="pl-s1">_document</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">70</span>:<span class="pl-c1">18</span>
  <span class="pl-s1">at</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">&lt;</span><span class="pl-s1">anonymous</span><span class="pl-c1">&gt;</span> <span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span>app<span class="pl-c1">/</span></span><span class="pl-kos">.</span><span class="pl-c1">next</span><span class="pl-c1">/</span><span class="pl-s1">dist</span><span class="pl-c1">/</span><span class="pl-s1">bundles</span><span class="pl-c1">/</span><span class="pl-s1">pages</span><span class="pl-c1">/</span><span class="pl-s1">_document</span><span class="pl-kos">.</span><span class="pl-c1">js</span>:<span class="pl-c1">73</span>:<span class="pl-c1">10</span><span class="pl-kos">)</span><span class="pl-kos"></span> code: <span class="pl-s">'MODULE_NOT_FOUND'</span></pre></div>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>


<ol dir="auto">
<li>Deploying <a href="https://github.com/eweilow/nextjs-deploy-test">https://github.com/eweilow/nextjs-deploy-test</a> to Heroku with their default configuration fails.</li>
</ol>
<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.0</td>
</tr>
<tr>
<td>node</td>
<td>9.x</td>
</tr>
<tr>
<td>OS</td>
<td>Ubuntu 16.04 on Heroku</td>
</tr>
<tr>
<td>browser</td>
<td>not relevant</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.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">HTML/JSX examples with <code class="notranslate">&lt;img&gt;</code> elements should have meaningful alt attributes.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">Two examples in <code class="notranslate">readme.md</code> use <code class="notranslate">&lt;img src="..."&gt;</code>  with no alt attribute.</p>
<p dir="auto">Instead, <code class="notranslate">alt</code> attributes should be part of the examples, either with an empty string value if the image is purely decorative (doesn't appear to be the case here), or with a text label that works as an adequate substitute for the image's intended meaning.</p>
<h2 dir="auto">Steps to Reproduce (for bugs)</h2>
<ol dir="auto">
<li>Visit <a href="https://github.com/zeit/next.js">https://github.com/zeit/next.js</a></li>
<li>Read through the readme</li>
</ol>
<h2 dir="auto">Context</h2>
<p dir="auto">Code examples that don't follow accessibility best practices train developers -- often with zero background or training in accessibility -- to treat accessibility as something superfluous and someone else's job.</p>