Nest plugin can be found under your node_modules directory under: @nestjs/swagger/dist/plugin

This should be set in your complier options:

"compilerOptions": {
     "plugins": ["@nestjs/swagger/dist/plugin"]
}
Answer from Nico on Stack Overflow
🌐
GitHub
github.com › nestjs › nest › issues › 10694
Build fails with the message, 'Error The "@nestjs/swagger" plugin is not compatible with Nest CLI. Neither "after()" nor "before()" nor "afterDeclarations()" function have been provided. · Issue #10694 · nestjs/nest
December 12, 2022 - get an error when trying to build nest app with swagger on it as a plugin but first you need to omit dev-dependencies i saw issue #9650 and its pretty much the same · his solution was to change the node env to development from production but when we set it to production, the default behavior for npm is to not install dev-dependencies and when we set it to something other then that the dev-dependencies will be install by npm
Author   nestjs
🌐
GitHub
github.com › nestjs › swagger › issues › 763
Jenkins says: @nestjs/swagger/plugin" plugin could not be found! · Issue #763 · nestjs/swagger
May 21, 2020 - my nest-cli.json is: { "collection": "@nestjs/schematics", "sourceRoot": "src", "compilerOptions": { "plugins": ["@nestjs/swagger/plugin"] } } any idea what can cause this issue? here is my dependency part of package.json, in case it is a matter of versions: "dependencies": { "@nestjs/common": "^7.0.0", "@nestjs/config": "^0.4.2", "@nestjs/core": "^7.0.0", "@nestjs/mongoose": "^6.4.0", "@nestjs/passport": "^7.0.0", "@nestjs/platform-express": "^7.0.0", "@nestjs/schedule": "^0.3.0", "@nestjs/swagger": "^4.5.7", "bcrypt": "^4.0.1", "class-transformer": "0.2.3", "class-validator": "0.12.2", "csurf": "^1.11.0", "dotenv": "^8.2.0", "express-rate-limit": "^5.1.3", "faker": "^4.1.0", "helmet": "^3.22.0", "mongoose": "^5.9.4", "passport": "^0.4.1", "passport-jwt": "^4.0.0", "reflect-metadata": "^0.1.13", "rimraf": "^3.0.2", "rxjs": "^6.5.4", "swagger-ui-express": "^4.1.4" },
Author   nestjs
🌐
GitHub
github.com › nestjs › nest-cli › issues › 1836
Error The "@nestjs/swagger" plugin is not compatible with Nest CLI. Neither "after()" nor "before()" nor "afterDeclarations()" function have been provided. · Issue #1836 · nestjs/nest-cli
November 25, 2022 - Error The "@nestjs/swagger" plugin is not compatible with Nest CLI. Neither "after()" nor "before()" nor "afterDeclarations()" function have been provided. This problem was also mentioned here nestjs/nest#9650 by @piosystems.
Author   nestjs
🌐
npm
npmjs.com › package › @nestjs › swagger
nestjs/swagger
2 weeks ago - Nest - modern, fast, powerful node.js web framework (@swagger). 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
🌐
Lightrun
lightrun.com › answers › nestjs-nest-build-fails-with-the-message-error-the-nestjsswagger-plugin-is-not-compatible-with-nest-cli-n
Build fails with the message, 'Error The "@nestjs/swagger" plugin is not compatible with Nest CLI. Neither "after()" nor "before()" nor "afterDeclarations()" function have been provided.
get an error when trying to build nest app with swagger on it as a plugin but first you need to omit dev-dependencies i saw issue https://github.com/nestjs/nest/issues/9650 and its pretty much the same · his solution was to change the node env to development from production but when we set it to production, the default behavior for npm is to not install dev-dependencies and when we set it to something other then that the dev-dependencies will be install by npm
🌐
Stack Overflow
stackoverflow.com › questions › 73511386 › nest-swagger-not-found
nestjs - Nest/swagger not found - Stack Overflow
Error "@nestjs/swagger/plugin" plugin could not be found! Have this error while starting my nestjs project. I don't know what am getting wrong. nestjs/swagger package is installed.
🌐
GitHub
github.com › nestjs › nest › issues › 9429
The "@nestjs/swagger" plugin is not compatible with Nest CLI. · Issue #9429 · nestjs/nest
April 2, 2022 - Is there an existing issue for this? I have searched the existing issues Current behavior npm run start:dev Error The "@nestjs/swagger" plugin is not compatible with Nest CLI. Neither "after()" nor "before()" nor "afterDeclarations()" fu...
Author   nestjs
Find elsewhere
🌐
GitHub
github.com › nestjs › swagger › issues › 405
Plugin error · Issue #405 · nestjs/swagger
December 4, 2019 - Plugin error#405 · Copy link · Cacus3 · opened · on Dec 4, 2019 · Issue body actions · [ ] Regression [X] Bug report [ ] Feature request [X] Documentation issue or request [ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow. I tried install swagger 4.0.1 and try it.But i got error · nest start Error "@nestjs/swagger/plugin" plugin could not be found ·
Author   nestjs
🌐
npm
npmjs.com › package › typescript-nestjs-swagger-plugin
typescript-nestjs-swagger-plugin - npm
@nestjs/swagger ttypescript plugin reduce the amount of boilerplate code required.. 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 using typescript-nestjs-swagger-plugin.
      » npm install typescript-nestjs-swagger-plugin
    
Published   Jun 28, 2023
Version   2.0.0
🌐
Stack Overflow
stackoverflow.com › questions › tagged › nestjs-swagger
Recently Active 'nestjs-swagger' Questions - Stack Overflow
I am facing an issue with Swagger UI in my NestJS application where it's not sending the Authorization header with the requests. I have set up JWT authentication and when I test the endpoints using ... ... I design this main.ts file and need to test the controllers with Swagger. I start:dev and all the server works fine, but cannot access via localhost:3000/docs/ws to enter Swagger UI. Here is the code: ... ... i can't install swagger in my nestjs application.
🌐
GitHub
github.com › nestjs › swagger › issues › 2018
CLI plugin is not working · Issue #2018 · nestjs/swagger
August 4, 2022 - The Swagger CLI plugin does not provide types without decorators. As you can see here, I implemented it according to the docs. At the time I started using this plugin, I had this problem only for minutes, after deleting node_modules/lock file and installing packages then the app, it was magically fixed.
Author   nestjs
🌐
GitHub
github.com › nestjs › swagger › issues › 1449
Nestjs crash during compilation when i want to install swagger · Issue #1449 · nestjs/swagger
Watching for file changes. ...est-practice/node_modules/@nestjs/swagger/index.js', '/home/mirsahib/Desktop/TechHack/nest-practice/dist/main.js' ] } ... Nest version: 7.6.0 For Tooling issues: - Node version: v14.17.2 - Platform: Linux (Ubuntu 20.04 LTS) Others...
Author   nestjs
🌐
GitHub
github.com › nestjs › swagger › issues › 552
Plugin doesn't work without nest-cli · Issue #552 · nestjs/swagger
February 6, 2020 - I'm not sure if this is a bug or just a missing feature, but it definitely goes against expectations. Have the plugin work just as it would if used via nest-cli. See this repository: https://github.com/boenrobot/nestjs-issues/tree/master/swagger-plugin-ignored
Author   nestjs
🌐
DEV Community
dev.to › ipreda › nx-nestjs-how-to-autogenerate-openapiswagger-specs-518n
Nx NestJs - How to autogenerate OpenApi/Swagger specs - DEV Community
May 9, 2022 - As I started using NestJs with Nx I noticed a point of contingency, there are still debates on how to activate OpenApi/Swagger in NestJs with the auto documentation option. Fear no more, at the end of this tutorial that problem will be solved. I am using the latest Nx at the time of writing, which is V14, with NestJs 8.0 and NestJs Swagger 5.2. Install the required package first, if you use express install npm install --save @nestjs/swagger swagger-ui-express otherwise, for fastify use npm install --save @nestjs/swagger fastify-swagger
🌐
GitHub
github.com › nestjs › swagger › issues › 558
nest-cli swagger plugin don't work · Issue #558 · nestjs/swagger
February 11, 2020 - my nest-cli.json: { "collection": "@nestjs/schematics", "sourceRoot": "src", "compilerOptions": { "plugins": [ "@nestjs/swagger/plugin" ] } }
Author   nestjs
🌐
Stack Overflow
stackoverflow.com › questions › 68395353 › nestjs-cli-plugin-enabling-the-swagger-plugin-for-npm-dependencies
NestJs - CLI Plugin - enabling the Swagger plugin for npm dependencies - Stack Overflow
July 15, 2021 - I created a npm DTO library used on different projects (front / back) On the back side, I use NestJs and I would like to activate the Swagger CLI-Plugin of NestJs (https://docs.nestjs.com/openapi/cli-