#what's wrong with my controller?

13 messages · Page 1 of 1 (latest)

quiet patrol
#

I generated it through nest cli with basic get request but it's failing.

shut tartan
#

so it works when you drop that AuthController from the controllers list?

quiet patrol
shut tartan
#

yep

quiet patrol
#

just tried it, still same

shut tartan
#

ok so you need to find out which change introduces such error

#

I guess that's due to some controller that doesn't have the @Controller() in it

#

I got the same error by adding a provider in the controllers array
So this is pretty much to something that you've done, or the CLI is broken

#

@quiet patrol you can do this minimal change to help you to find which class didn't have @Controller() on it:

  1. go to node_modules/@nestjs/core/router/router-explorer.js
  2. right above the line 56, add this: console.log('>'.repeat(20), metatype?.name)
shut tartan
quiet patrol
shut tartan
quiet patrol