{"record":{"id":"b989bc2807a68de0","repo":"emberjs/ember.js","slug":"attempted-to-load-a-helper-but-there-wasn-t-a-hel","errorCode":null,"errorMessage":"Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: ${debugToString!(definition)}","messagePattern":"Attempted to load a helper, but there wasn't a helper manager associated with the definition\\. The definition was: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@glimmer/manager/lib/internal/api.ts","lineNumber":165,"sourceCode":"    () =>\n      // eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme\n      `Attempted to use a value as a helper, but it was not an object or function. Helper definitions must be objects or functions with an associated helper manager. The value was: ${definition}`\n  );\n\n  let manager = getManager(HELPER_MANAGERS, definition);\n\n  // Functions are special-cased because functions are defined\n  // as the \"default\" helper, per: https://github.com/emberjs/rfcs/pull/756\n  if (manager === undefined && typeof definition === 'function') {\n    manager = DEFAULT_MANAGER;\n  }\n\n  if (manager) {\n    return manager;\n  } else if (isOptional === true) {\n    return null;\n  } else if (DEBUG) {\n    throw new Error(\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- @fixme\n      `Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was: ${debugToString!(\n        definition\n      )}`\n    );\n  }\n\n  return null;\n}\n\nexport function setInternalComponentManager<T extends object>(\n  factory: InternalComponentManager,\n  obj: T\n): T {\n  return setManager(COMPONENT_MANAGERS, factory, obj);\n}\n\nexport function getInternalComponentManager(definition: object): InternalComponentManager;","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@glimmer/manager/lib/internal/api.ts#L147-L183","documentation":"`getInternalHelperManager()` looks up a helper manager for a definition (class, function, or object passed as a helper). If no manager is associated and none is expected to be registered, the library throws in DEBUG builds with the definition rendered via `debugToString`. This catches mis-registered helpers early instead of failing obscurely later at render time.","triggerScenarios":"Passing a value as a helper that was never registered via `setHelperManager` (or via Ember's helper() decorator/API), e.g. passing a plain function or class where a managed helper definition is required.","commonSituations":"Migrating between Ember/Glimmer helper APIs where registration was dropped; typos in resolver registration; passing the wrong object (component class instead of helper) into a helper slot.","solutions":["Register the definition with `setHelperManager(managerFactory, definition)` from @glimmer/manager","Verify the value passed is actually the helper definition (not its wrapper or an unrelated class)","Check the printed definition in the error to identify which object lacks a manager","For optional lookups, call `getInternalHelperManager(definition, true)` so null is returned instead of throwing"],"exampleFix":"// before\nexport default class MyHelper {} // no manager registered\n// after\nimport { setHelperManager } from '@glimmer/manager';\nclass MyHelperManager { ... }\nexport default setHelperManager(() => new MyHelperManager(), class MyHelper {});","handlingStrategy":"type-guard","validationCode":"import { getInternalHelperManager, setHelperManager } from '@glimmer/manager';\nif (getInternalHelperManager(definition, true) === null) {\n  setHelperManager(() => new MyHelperManager(), definition);\n}","typeGuard":"function hasHelperManager(d: unknown): boolean { return getInternalHelperManager(d, true) !== null; }","tryCatchPattern":"try { helper(definition); } catch (e) { if (/wasn't a helper manager/.test(e.message)) throw new Error(`Helper not registered: ${String(definition)}`); throw e; }","preventionTips":["Always register helpers with setHelperManager at module scope","Pass `true` as the second arg to getInternalHelperManager for optional lookups","Log the definition shown in the error to find the unregistered object"],"tags":["helpers","manager","registration"],"backgroundTag":"missing-helper-manager","analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}