What this error means
Module.options accepts classes only, and each class must have exactly one role: @Option() or @OptionCommand().
- An
@Optionmust declare at least one field option and cannot contain@Handlermethods. - An
@OptionCommandmust declare exactly one default@Handler()and cannot contain field options, path Handlers, or flag Handlers. - Provider objects and classes decorated only with
@Injectable()belong inModule.providers.
details.reason distinguishes a missing option decorator from a class that declares multiple roles. Other details list invalid fields or Handlers.
How to fix it
Decide whether the class represents shared fields, a mutually exclusive action, or an ordinary dependency. Use @Option, @OptionCommand, or @Injectable accordingly, and place the class in the correct Module array. Do not make one class serve more than one of those roles.