errors/now-next-no-serverless-pages-built.md
@vercel/next No Serverless Pages BuiltThis error occurs when your application is not configured for Serverless Next.js build output.
In order to create the smallest possible lambdas Next.js has to be configured to build for the serverless target.
latest version:npm install next --save
Check Node.js Version in your Project Settings. Using an old or incompatible version of Node.js can cause the Build Step to fail with this error message.
Add the now-build script to your package.json [deprecated]
{
"scripts": {
"now-build": "next build"
}
}
target: 'serverless' to next.config.js [deprecated]module.exports = {
target: 'serverless',
// Other options
};
Remove distDir from next.config.js as @vercel/next can't parse this file and expects your build output at /.next
Optionally make sure the "src" in "builds" points to your application package.json
{
"version": 2,
"builds": [{ "src": "package.json", "use": "@vercel/next" }]
}
https://vercel.com/[username]/[project]/settings)