I am building a site in nextJS. Recently I got an error when I run yarn run dev for building. Which is,
> Build error occurred
Error: Export encountered errors on following paths:
/[page]/[pid]/[slug]
at /home/ubu/Desktop/Projects/HexaCom-Final One/HexaCom/node_modules/next/dist/export/index.js:500:19
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Span.traceAsyncFn (/home/ubu/Desktop/Projects/HexaCom-Final One/HexaCom/node_modules/next/dist/trace/trace.js:74:20)
at async /home/ubu/Desktop/Projects/HexaCom-Final One/HexaCom/node_modules/next/dist/build/index.js:987:17
at async Span.traceAsyncFn (/home/ubu/Desktop/Projects/HexaCom-Final One/HexaCom/node_modules/next/dist/trace/trace.js:74:20)
at async /home/ubu/Desktop/Projects/HexaCom-Final One/HexaCom/node_modules/next/dist/build/index.js:861:13
at async Span.traceAsyncFn (/home/ubu/Desktop/Projects/HexaCom-Final One/HexaCom/node_modules/next/dist/trace/trace.js:74:20)
at async Object.build [as default] (/home/ubu/Desktop/Projects/HexaCom-Final One/HexaCom/node_modules/next/dist/build/index.js:82:25)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I tried to solve it by adding solutions from the internet like adding log files inside
getStaticProps function. Nothing solving the issue.