Skip to main content

Requirements

PackageRole
nextPeer dependency — App Router only.
reactPeer dependency (matches Next.js's own requirement).
class-validator, class-transformerRequired for @Body() DTO validation.
class-validator-jsonschemaRequired only if you use generateOpenApiDocument().
swagger-ui-distRequired only if you use createSwaggerUiHandler().

Every dependency beyond next/react is an optional peer dependency — install only the ones the features you use actually need. npm install nextjs-nestapi alone will not pull any of them in for you.