#The "@nestjs/swagger" plugin is not compatible with Nest CLI.

6 messages Β· Page 1 of 1 (latest)

formal rampart
#

I am following the documentation in order to install the swagger plugin, but when i run my nest application the terminal returns: The "@obsidian verge/swagger" plugin is not compatible with Nest CLI. Neither "after()" nor "before()" nor "afterDeclarations()" function have been provided.

My nest-cli.json is the following:

{
  "$schema": "https://json.schemastore.org/nest-cli",
  "collection": "@nestjs/schematics",
  "sourceRoot": "src",
  "compilerOptions": {
    "deleteOutDir": true,
    "plugins": [
      {
        "name": "@nestjs/swagger",
        "options": {
          "introspectComments": true
        }
      }
    ]
  }
}
proper spruceBOT
#

Suggestion for @formal rampart:
Please run the command npx -y @nestjs/cli info and paste the output in a code block. This will help us determine if there is a version issue in your packages and which version of nest we are triaging.

formal rampart
#

Here the results:

[System Information]
OS Version     : macOS Monterey
NodeJS Version : v18.18.2
NPM Version    : 9.8.1 

[Nest CLI]
Nest CLI Version : 10.2.1 

[Nest Platform Information]
cache-manager version : 2.1.1
schematics version    : 10.0.3
mongoose version      : 10.0.1
swagger version       : 7.1.15
testing version       : 10.2.8
common version        : 10.2.8
config version        : 3.1.1
core version          : 10.2.8
jwt version           : 10.1.1
cli version           : 10.2.1
urban horizon
#

what about npm ls typescript

formal rampart
#

@urban horizon here it is:

└─┬ backend@0.0.1 -> ./packages/backend
  β”œβ”€β”¬ @nestjs/cli@10.2.1
  β”‚ β”œβ”€β”¬ fork-ts-checker-webpack-plugin@9.0.2
  β”‚ β”‚ β”œβ”€β”¬ cosmiconfig@8.3.6
  β”‚ β”‚ β”‚ └── typescript@5.2.2 deduped
  β”‚ β”‚ └── typescript@5.2.2 deduped
  β”‚ └── typescript@5.2.2 deduped
  β”œβ”€β”¬ @nestjs/schematics@10.0.3
  β”‚ └── typescript@5.2.2 deduped
  β”œβ”€β”¬ @typescript-eslint/eslint-plugin@6.9.1
  β”‚ └─┬ ts-api-utils@1.0.3
  β”‚   └── typescript@5.2.2 deduped
  β”œβ”€β”¬ ts-jest@29.1.1
  β”‚ └── typescript@5.2.2 deduped
  β”œβ”€β”¬ ts-loader@9.5.0
  β”‚ └── typescript@5.2.2 deduped
  β”œβ”€β”¬ ts-node@10.9.1
  β”‚ └── typescript@5.2.2 deduped
  └── typescript@5.2.2
uncut grail
#

I'm facing the same issue as well, it seems to happen on production build