While attempting to build my Next.js project, I encountered an error that prevents the build process from completing successfully. The error occurs specifically during the collection of page data for the /setting route. This issue arises when running the npm run build command.
Error: Failed to collect page data for /setting
at /vercel/path0/node_modules/next/dist/build/utils.js:1268:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'Error'
}
Error: Command "npm run build" exited with 1
at t (/vercel/path0/.next/server/webpack-runtime.js:1:143)
at 29126 (/vercel/path0/.next/server/app/(protected)/setting/page.js:1:3530)
at t (/vercel/path0/.next/server/webpack-runtime.js:1:143)
at 66899 (/vercel/path0/.next/server/app/(protected)/setting/page.js:1:1494)
at t (/vercel/path0/.next/server/webpack-runtime.js:1:143)
at r (/vercel/path0/.next/server/app/(protected)/setting/page.js:1:31453)
at /vercel/path0/.next/server/app/(protected)/setting/page.js:1:31496 {
clientVersion: '5.13.0',
errorCode: undefined
}
The /setting page is designed to handle user settings, including authentication and sign-out functionality. It utilizes server-side data fetching to retrieve the session information.