It was an issue with global dependencies conflicting with local ones, as well as the old build (set to incremental mode) conflicting with the new property generation. Did the following to resolve the issue:

  • If nest cli is globally installed, manually upgrade it: yarn global upgrade upgrade @nestjs/cli, or with npm (npm update -g @nestjs/cli)
  • Upgrade local service nest to most recent version: nest update
  • Add the following to your nest-cli.json:
  "compilerOptions": {
    "plugins": ["@nestjs/swagger/plugin"]
  }
  • Remove your local dist folder (or do a yarn build)
  • Start the server with the nest cli commands (i.e. nest start or nest start:dev)
Answer from coler-j 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
🌐
DevPress
devpress.csdn.net › cicd › 63179d44237eb178e9dfc3fd.html
Nest.js swagger plugin not found under jenkins_jenkins_CdCic-CI/CD
September 7, 2022 - Nest plugin can be found under your node_modules directory under: @nestjs/swagger/dist/plugin
🌐
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
🌐
GitHub
github.com › nestjs › swagger › issues › 763
Jenkins says: @nestjs/swagger/plugin" plugin could not be found! · Issue #763 · nestjs/swagger
May 21, 2020 - 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" }, Nest version: ^7.0.0 For Tooling issues: - Node version: 9.11.2 - Platform: Linux ubuntu 17 Others:
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. SOLUTION: Once I removed the compilerOptions from the nest-cli.json file, I got it working. ... # ... RUN pnpm fetch RUN pnpm install -r --frozen-lockfile --offline --filter '...' RUN pnpm --filter '...' build #...
Author   nestjs
🌐
npm
npmjs.com › package › typescript-nestjs-swagger-plugin
typescript-nestjs-swagger-plugin - npm
Add this plugin to tsconfig.json.
      » npm install typescript-nestjs-swagger-plugin
    
Published   Jun 28, 2023
Version   2.0.0
Find elsewhere
🌐
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.
🌐
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
🌐
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 &qu...
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 › 405
Plugin error · Issue #405 · nestjs/swagger
December 4, 2019 - [ ] 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" ...
Author   nestjs
🌐
NestJS
docs.nestjs.com › openapi › cli-plugin
CLI Plugin - OpenAPI | NestJS - A progressive Node.js ...
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
🌐
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
🌐
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 › 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