NestJS 9 was recently released (2 days ago).
https://trilon.io/blog/nestjs-9-is-now-available.
Changes have been made to the @nestjs/swagger package. You are installing the latest version which has peer dependencies on NestJS 9 while your project is still on version 8.4.7.
The error is saying it cannot resolve the requested peer dependency @nestjs/common@^9.0.0. It does find @nestjs/common@8.4.7 instead, but that's not compatible.
Either upgrade NestJS or install an older version of the @nestjs/swagger package that is compatible with the NestJS version your application uses. Version 5.2.1 should work for you.
yarn add @nestjs/swagger@5.2.1
OR
npm i @nestjs/swagger@5.2.1
Answer from Christophe Geers on Stack Overflownpm
npmjs.com › package › @nestjs › swagger
@nestjs/swagger - npm
2 weeks ago - Latest version: 11.4.6, last published: 10 days ago. Start using @nestjs/swagger in your project by running `npm i @nestjs/swagger`. There are 2486 other projects in the npm registry using @nestjs/swagger.
» npm install @nestjs/swagger
Published Jul 17, 2026
Version 11.4.6
GitHub
github.com › nestjs › swagger
GitHub - nestjs/swagger: OpenAPI (Swagger) module for Nest framework (node.js) :earth_americas: · GitHub
OpenAPI (Swagger) module for Nest. $ npm i --save @nestjs/swagger · Overview & Tutorial · Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here. Author - Kamil Myśliwiec ·
Author nestjs
17:22
Installing SWAGGER in a NestJS project - YouTube
03:54
How to Integrate Swagger API documentation in NestJs - YouTube
12:29
19 Nest JS JWT Swagger API documentation setup - YouTube
16:13
Swagger in NestJS - YouTube
08:54
Nest Js y SWAGGER ¡Fácil y rápido! - YouTube
12:28
Como añadir Swagger a NestJS? - YouTube
Tessl
tessl.io › registry › tessl › npm-nestjs--swagger
11.2.0 • npm-nestjs--swagger • tessl • Registry • Tessl
January 29, 2026 - OpenAPI (Swagger) module for Nest framework enabling automatic API documentation generation from TypeScript decorators ... @nestjs/swagger is the official OpenAPI (Swagger) integration library for NestJS applications.
npm
npmjs.com › package › nestjs-swagger-dto
nestjs-swagger-dto - npm
This library combines common @nestjs/swagger, class-transformer and class-validator decorators that are used together into one decorator for full Nest.js DTO lifecycle including OpenAPI schema descriptions.
» npm install nestjs-swagger-dto
Published Oct 16, 2025
Version 3.8.5
npm
npmjs.com › package › @concepta › nestjs-swagger-ui
@concepta/nestjs-swagger-ui - npm
Rockets NestJS Swagger UI. Latest version: 7.0.0-alpha.10, last published: 3 months ago. Start using @concepta/nestjs-swagger-ui in your project by running `npm i @concepta/nestjs-swagger-ui`. There are 3 other projects in the npm registry using @concepta/nestjs-swagger-ui.
» npm install @concepta/nestjs-swagger-ui
Published Nov 21, 2025
Version 7.0.0-alpha.10
npm
npmjs.com › package › @globalart › nestjs-swagger
@globalart/nestjs-swagger - npm
January 7, 2026 - Start using @globalart/nestjs-swagger in your project by running `npm i @globalart/nestjs-swagger`. There are no other projects in the npm registry using @globalart/nestjs-swagger.
» npm install @globalart/nestjs-swagger
Published Feb 23, 2026
Version 1.3.0
Author GlobalArt, Inc
npm
npmjs.com › package › typescript-nestjs-swagger-plugin
typescript-nestjs-swagger-plugin - npm
Latest version: 2.0.0, last published: 3 years ago. Start using typescript-nestjs-swagger-plugin in your project by running `npm i typescript-nestjs-swagger-plugin`. There are 1 other projects in the npm registry ...
» npm install typescript-nestjs-swagger-plugin
Published Jun 28, 2023
Version 2.0.0
Snyk
security.snyk.io › package › npm › @nestjs › swagger
nestjs/swagger
Detailed information and remediation guidance for vulnerabilities.
Generalist Programmer
generalistprogrammer.com › home › tutorials › npm packages › nestjs-swagger: modern, fast, powerful node.js web fra guide
Nestjs swagger Guide: modern, fast, powerful node.js web frame [2026]
November 16, 2025 - import nestjs_swagger from '@nestjs/swagger' // TypeScript usage with type safety const result: ReturnType<typeof nestjs_swagger> = nestjs_swagger() Check npm for similar packages - Alternative option
npm
npmjs.com › package › @byndyusoft › nest-swagger
@byndyusoft/nest-swagger - npm
September 1, 2023 - Latest version: 7.1.9-1, last published: 2 years ago. Start using @byndyusoft/nest-swagger in your project by running `npm i @byndyusoft/nest-swagger`. There are 0 other projects in the npm registry using @byndyusoft/nest-swagger.
» npm install @byndyusoft/nest-swagger
Published Sep 01, 2023
Version 7.1.9-1
Author Byndyusoft
Repository https://github.com/Byndyusoft/nest-swagger