Sometimes you may need to control how many threads Next.js is using during the Build & Export phase. This may be helpful when troubleshooting the export process, or when you need to reduce the amount of requests going to the Sitecore instance during export (if the Content Sync feature is not enabled).
As of Next.js v10.0, this is still and experimental feature.
workerThreads to false and
next.config.js as shown below.
This will ensure that Next.js runs the build and export in a single thread.
Restart the Next.js server after this change.