#what's wrong with my controller?
13 messages · Page 1 of 1 (latest)
so it works when you drop that AuthController from the controllers list?
you mean if i remove the controller from controllers in module?
yep
just tried it, still same
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:
- go to
node_modules/@nestjs/core/router/router-explorer.js - right above the line 56, add this:
console.log('>'.repeat(20), metatype?.name)
btw I just made a PR to improve the error message: https://github.com/nestjs/nest/pull/10479
PR Checklist
Please check if your PR fulfills the following requirements:
The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
Tests for the chan...
just did, it's pointing to my repository
so looks like you have UsersRepository listed in some controllers array somewhere, which is wrong
you are right, I had my UsersRepository called in controllers when it should've been in providers