<h1 dir="auto">Bug report</h1>
<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">App builds ok on local, but not on vercel</p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto"><a href="url"> github.com/longfellowone/cloud-client </a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="10:20:45.168  	Cloning github.com/longfellowone/cloud-client (Branch: main, Commit: 6266e9f)
10:20:45.644  	Cloning completed: 476.471ms
10:20:45.671  	Analyzing source code...
10:20:46.967  	Installing build runtime...
10:20:49.839  	Build runtime installed: 2.871s
10:20:52.765  	Looking up build cache...
10:20:54.868  	Build cache downloaded [40.73 MB]: 1792.809ms
10:20:56.040  	Installing dependencies...
10:20:56.043  	Detected `package-lock.json` generated by npm 7...
10:20:57.494  	added 2 packages in 1s
10:20:57.496  	95 packages are looking for funding
10:20:57.496  	  run `npm fund` for details
10:20:57.504  	Detected Next.js version: 11.1.2
10:20:57.508  	Running &quot;npm run build&quot;
10:20:57.786  	&gt; build
10:20:57.786  	&gt; next build
10:20:58.365  	info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
10:20:58.518  	info  - Checking validity of types...
10:21:02.373  	info  - Creating an optimized production build...
10:21:04.756  	/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59190
10:21:04.756  									processContextHashSnapshot(path, tsh.hash);
10:21:04.756  									                                     ^
10:21:04.756  	TypeError: Cannot read property 'hash' of null
10:21:04.756  	    at callback (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59190:46)
10:21:04.756  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:57683:39
10:21:04.757  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:135587:5
10:21:04.757  	    at Hook.eval [as callAsync] (eval at create (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:33832:10), &lt;anonymous&gt;:6:1)
10:21:04.757  	    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:33634:14)
10:21:04.757  	    at AsyncQueue._handleResult (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:135557:21)
10:21:04.757  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:135540:11
10:21:04.757  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59794:14
10:21:04.757  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59452:6
10:21:04.757  	    at done (/vercel/path0/node_modules/next/dist/compiled/neo-async/async.js:1:10308)
10:21:04.757  	    at continueWithHash (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59341:13)
10:21:04.758  	    at FileSystemInfo._getFileTimestampAndHash (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59363:4)
10:21:04.758  	    at fromFile (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59730:13)
10:21:04.758  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59441:15
10:21:04.758  	    at Array.&lt;anonymous&gt; (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:140338:5)
10:21:04.758  	    at runCallbacks (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:20480:15)
10:21:04.784  	Error: Command &quot;npm run build&quot; exited with 1"><pre class="notranslate"><code class="notranslate">10:20:45.168  	Cloning github.com/longfellowone/cloud-client (Branch: main, Commit: 6266e9f)
10:20:45.644  	Cloning completed: 476.471ms
10:20:45.671  	Analyzing source code...
10:20:46.967  	Installing build runtime...
10:20:49.839  	Build runtime installed: 2.871s
10:20:52.765  	Looking up build cache...
10:20:54.868  	Build cache downloaded [40.73 MB]: 1792.809ms
10:20:56.040  	Installing dependencies...
10:20:56.043  	Detected `package-lock.json` generated by npm 7...
10:20:57.494  	added 2 packages in 1s
10:20:57.496  	95 packages are looking for funding
10:20:57.496  	  run `npm fund` for details
10:20:57.504  	Detected Next.js version: 11.1.2
10:20:57.508  	Running "npm run build"
10:20:57.786  	&gt; build
10:20:57.786  	&gt; next build
10:20:58.365  	info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
10:20:58.518  	info  - Checking validity of types...
10:21:02.373  	info  - Creating an optimized production build...
10:21:04.756  	/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59190
10:21:04.756  									processContextHashSnapshot(path, tsh.hash);
10:21:04.756  									                                     ^
10:21:04.756  	TypeError: Cannot read property 'hash' of null
10:21:04.756  	    at callback (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59190:46)
10:21:04.756  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:57683:39
10:21:04.757  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:135587:5
10:21:04.757  	    at Hook.eval [as callAsync] (eval at create (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:33832:10), &lt;anonymous&gt;:6:1)
10:21:04.757  	    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:33634:14)
10:21:04.757  	    at AsyncQueue._handleResult (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:135557:21)
10:21:04.757  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:135540:11
10:21:04.757  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59794:14
10:21:04.757  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59452:6
10:21:04.757  	    at done (/vercel/path0/node_modules/next/dist/compiled/neo-async/async.js:1:10308)
10:21:04.757  	    at continueWithHash (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59341:13)
10:21:04.758  	    at FileSystemInfo._getFileTimestampAndHash (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59363:4)
10:21:04.758  	    at fromFile (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59730:13)
10:21:04.758  	    at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:59441:15
10:21:04.758  	    at Array.&lt;anonymous&gt; (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:140338:5)
10:21:04.758  	    at runCallbacks (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:20480:15)
10:21:04.784  	Error: Command "npm run build" exited with 1
</code></pre></div>
<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version:<br>
Node.js version:<br>
Operating System:<br>
Additional tools:</p>
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br>
Bug</p>


<p dir="auto"><strong>What is the current behavior?</strong></p>
<p dir="auto">Running <code class="notranslate">npx next build</code></p>
<p dir="auto">Causes the following error:<br>
<code class="notranslate">info  - Creating an optimized production build . project-path\node_modules\next\dist\compiled\webpack\bundle5.js:59190 processContextHashSnapshot(path, tsh.hash);</code><br>
^</p>
<p dir="auto"><code class="notranslate">TypeError: Cannot read property 'hash' of null</code></p>
<p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p>
<p dir="auto">All I assumingly did was adding a layout and components, e.g. footer</p>



<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">Building instead of failing, or failing gracefully</p>
<p dir="auto"><strong>Other relevant information:</strong><br>
webpack version: 5.58.1 (that came with the next version)<br>
next: 11.1.2</p>
<p dir="auto">Solution:<br>
I deleted <code class="notranslate">.next</code> to fix this. I'd run <code class="notranslate">vercel --force</code> to skip the build cache if I was on vercel.</p>
<p dir="auto">If a webpack dev wants to, they can get access to the private repo, and see the differences between the commits in detail.</p>