{"record":{"id":"c9c2be1ae2f8c30b","repo":"medusajs/medusa","slug":"the-subscriber-in-path-is-missing-an-event-in-t","errorCode":null,"errorMessage":"The subscriber in ${path} is missing an event in the config. skipped.","messagePattern":"The subscriber in (.+?) is missing an event in the config\\. skipped\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/framework/src/subscribers/subscriberLoader.ts","lineNumber":111,"sourceCode":"    if (!config.event) {\n      /**\n       * If the subscriber is missing an event, we can't use it.\n       * In production we throw an error, else we log a warning\n       */\n      if (configManager.isProduction) {\n        throw new Error(\n          `The subscriber in ${path} is missing an event in the config.`\n        )\n      } else {\n        this.logger.warn(\n          `The subscriber in ${path} is missing an event in the config. skipped.`\n        )\n      }\n\n      return false\n    }","sourceCodeStart":null,"sourceCodeEnd":null,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/core/framework/src/subscribers/subscriberLoader.ts#L111","documentation":"SubscriberConfig.event tells the loader which event(s) to subscribe to. When config exists but has no `event` property, the loader refuses the file. In development this is a warning and the subscriber is skipped; in production (configManager.isProduction) the loader instead THROWS 'The subscriber in ${path} is missing an event in the config', blocking startup.","triggerScenarios":"export const config = { context: {...} } with no event key, or event set to undefined/null via a computed value.","commonSituations":"Refactoring a subscriber to listen to multiple events and accidentally deleting the event field; conditional event assignments that evaluate to undefined; passing NODE_ENV=production with a half-finished subscriber file causing deploy-time boot failure.","solutions":["Set event in the config: export const config = { event: \"product.updated\" } or an array: { event: [\"product.created\", \"product.updated\"] }","Run a local production-mode boot (NODE_ENV=production) before deploying so this surfaces as a hard error in CI rather than on the server"],"exampleFix":"// before\nexport const config = { context: { subscriberId: \"product-handler\" } }\n\n// after\nexport const config = {\n  event: \"product.updated\",\n  context: { subscriberId: \"product-handler\" },\n}","handlingStrategy":"validation","validationCode":"export const config: SubscriberConfig = {\n  event: process.env.SUB_EVENT ?? \"product.updated\", // always a string\n}","typeGuard":"const hasValidEvent = (c: any): c is { event: string | string[] } =>\n  !!c?.event &&\n  (typeof c.event === \"string\" ||\n    (Array.isArray(c.event) && c.event.every((e) => typeof e === \"string\")))","tryCatchPattern":null,"preventionTips":["Always set event in the config export","Boot the app once with NODE_ENV=production in CI to catch the production throw early","Never compute event to possibly-undefined values"],"tags":["subscribers","event-bus","config","production"],"backgroundTag":"missing-required-config","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}