中文
← Errors

F_SYSTEM_DUPLICATE_APPLICATION_FEATURE

Duplicate application feature

createApp received more than one application feature with the same key.

Updated

Reproduction

The same application feature is registered more than once:

src/index.ts
import { createApp } from 'func'
import { withCompletion } from 'func/completion'
import { AppModule } from './app.module'

createApp(AppModule, {
  features: [
    withCompletion({ bin: 'ship' }),
    withCompletion({ bin: 'ship' }),
  ],
})

What this error means

Every application feature has a unique key: completion uses completion, for example, while process signals use process-signals. A createApp() call may include each key only once. details.key contains the conflicting feature key.

How to fix it

Keep one call to the relevant feature factory. If its behavior needs to change, combine the settings into one configuration instead of registering the same feature twice. Features with different keys may still be used together.