medusajs/medusa · warning
The subscriber in ${path} is missing a config. skipped.
Error message
The subscriber in ${path} is missing a config. skipped. What it means
The SubscriberLoader requires each subscriber file to export both a default handler function and a named `config` export of type SubscriberConfig ({ event, context? }). When subscriber.config is falsy the file is skipped with this warning, so no event subscription is registered.
Source
Thrown at packages/core/framework/src/subscribers/subscriberLoader.ts:95
const config = subscriber.config
if (!config) {
/**
* If the subscriber is missing a config, we can't use it
*/
this.logger.warn(
`The subscriber in ${path} is missing a config. skipped.`
)
return false
}View on GitHub (pinned to 5e06e544a2)
Solutions
- Add export const config: SubscriberConfig = { event: "order.placed" } (and optionally context.subscriberId) next to the default handler
- Make sure the export name is exactly `config`
Example fix
// before
export default async function orderPlacedHandler({ event }) { /* ... */ }
// after
export const config = { event: "order.placed" }
export default async function orderPlacedHandler({ event }) { /* ... */ } Defensive patterns
Strategy: validation
Validate before calling
// in each subscriber file, before export
import type { SubscriberConfig } from "@medusajs/framework/subscribers"
export const config: SubscriberConfig = { event: "order.placed" }
export default async function handler() {} Type guard
const hasSubscriberConfig = (m: any) => m?.config !== undefined && m?.config !== null
Prevention
- Name the export exactly `config`
- Add a shared lint/typecheck or a loader test asserting both default and config exports exist
When it happens
Trigger: A subscriber file with a valid default-exported handler but no `export const config = { event: ... }`, or a config exported under a different name (e.g. `export const subscriberConfig`).
Common situations: Writing only the handler and forgetting the config export; renaming the config export; copy-paste from examples that define a local const without exporting it.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- The subscriber in ${path} is not a function. skipped.
- The subscriber in ${path} is missing an event in the config.
- The subscriber in ${path} has an invalid event config. The e
- Invalid default export found in ${absolutePath}. Make sure t
- Module ${moduleConfig.resolve} doesn't have a serviceName. P
AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27).
Data as JSON: /api/errors/52b3c6edc35e865f.
Report an issue: GitHub.