title: next.js error: Error: > Build failed because of webpack errors
body: <p>I'm trying to deploy a nextJs app but when I run <code>npm run build</code> I see some of the errors listed below:</p>
  <p>Build error occurred
  Error:</p>
  <blockquote>
  <p>Build failed because of webpack errors
  at /Users/hassan/Upwork/ROCProjectNext.js/ROCNext/node_modules/next/dist/build/index.js:15:918
  at runMicrotasks ()
  at processTicksAndRejections (internal/process/task_queues.js:93:5)
  at async /Users/hassan/Upwork/ROC Project Next.js/ROC- Next/node_modules/next/dist/build/tracer.js:1:525</p>
  <p>npm ERR! code ELIFECYCLE</p>
  <p>npm ERR! errno 1</p>
  <p>npm ERR! admin-1.0@0.1.0 build: <code>next build</code></p>
  <p>npm ERR! Exit status 1</p>
  <p>npm ERR!</p>
  <p>npm ERR! Failed at the admin-1.0@0.1.0 build script.</p>
  <p>npm ERR! This is probably not a problem with npm. There is likely
  additional logging output above.</p>
  <p>npm ERR! A complete log of this run can be found in: npm ERR!<br />
  /Users/hassan/.npm/_logs/2021-04-07T06_52_28_325Z-debug.log</p>
  </blockquote>
  <p>any suggestions?</p>