I'm trying to deploy a nextJs app but when I run npm run build I see some of the errors listed below:
Build error occurred Error:
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
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:
next buildnpm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR!
/Users/hassan/.npm/_logs/2021-04-07T06_52_28_325Z-debug.log
any suggestions?
1 Answer 1
Kindly check your nextjs version in package.json file it is upgraded to latest version. Downgrade the version of nextjs it will help you to avoid this error.
package.jsonfile, check this one.