中文
← Errors

F_SYSTEM_INVALID_MODULE_INPUT

Invalid module input

A class passed as a module does not carry explicit module metadata.

Updated

Reproduction

A command class cannot be passed directly as the application input:

src/index.ts
import { Command, Handler, createApp } from 'func'

@Command('build')
class BuildCommand {
  @Handler()
  run() {}
}

createApp(BuildCommand)

What this error means

Class inputs must carry @Module() metadata. func no longer treats an undecorated module input as a command automatically.

How to fix it

Create a class decorated with @Module({ commands: [BuildCommand] }) and pass that module to createApp.