中文
← Errors

F_SYSTEM_MULTIPLE_MISSING_COMMANDS

Multiple missing commands

The application registers more than one fallback for unknown command names.

Updated

Reproduction

func cannot choose between multiple unknown-command fallbacks:

src/app.module.ts
import { CommandMissing, Handler, Module, createApp } from 'func'

@CommandMissing()
class FirstMissing {
  @Handler()
  run() {}
}

@CommandMissing()
class SecondMissing {
  @Handler()
  run() {}
}

@Module({ commands: [FirstMissing, SecondMissing] })
class AppModule {}

createApp(AppModule)

How to fix it

Register exactly one missing command and consolidate the fallback behavior there:

src/app.module.ts
@CommandMissing()
class MissingCommand {
  @Handler()
  run() {}
}

@Module({ commands: [MissingCommand] })
class AppModule {}

createApp(AppModule)