mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 04:22:01 +00:00
After many hours of debugging, I tracked down that having an old Node version (eg 14.x) listed in your Vercel project settings can result in the build step failing with a confusing and unhelpful error message "`@vercel/next` No Serverless Pages Built". Note that this is a case where it "can" cause it to fail, including with NextJS 13.1.6 and Vercel CLI 28.16.2, but it is not guaranteed to fail. I have six NextJS projects. They have identical next.config.js, tsconfig.json, eslintrc.js, and .gitignore files, and other than a few seemingly non-critical dependencies they have identical package.json files. Four of the six consistently built and deployed in the cloud without issue. Two consistently failed to build in the cloud. All built successfully locally including using vercel build locally, and all would vercel deploy --prebuilt successfully. Switching all the vercel cloud project settings from Node 14.x to Node 18.x enabled all the projects to build and deploy successfully in the vercel cloud without needing local vercel build and local vercel deploy --prebuilt steps. --------- Co-authored-by: Steven <steven@ceriously.com>