emberjs/ember.js · error · Error

You attempted to mount the engine '${name}', but it is not r

Error message

You attempted to mount the engine '${name}', but it is not registered with its parent.

What it means

EngineInstance#buildChildEngineInstance(name) looks up 'engine:<name>' in its registry. If no engine with that name is registered with the parent engine instance, it throws this error explaining the engine must be registered with its parent before mounting.

Source

Thrown at packages/@ember/engine/instance.ts:206

  }

  /**
    Build a new `EngineInstance` that's a child of this instance.

    Engines must be registered by name with their parent engine
    (or application).

    @private
    @method buildChildEngineInstance
    @param name {String} the registered name of the engine.
    @param options {Object} options provided to the engine instance.
    @return {EngineInstance,Error}
  */
  buildChildEngineInstance(name: string, options: EngineInstanceOptions = {}): EngineInstance {
    let ChildEngine = this.lookup(`engine:${name}`) as Engine;

    if (!ChildEngine) {
      throw new Error(
        `You attempted to mount the engine '${name}', but it is not registered with its parent.`
      );
    }

    let engineInstance = ChildEngine.buildInstance(options);

    setEngineParent(engineInstance, this);

    return engineInstance;
  }

  /**
    Clone dependencies shared between an engine instance and its parent.

    @private
    @method cloneParentDependencies
  */
  cloneParentDependencies() {

View on GitHub (pinned to 26f97246a8)

Solutions

  1. Register the engine on the parent instance: parent.register('engine:chat', ChatEngine) or via ember-engines dependencies config
  2. Verify the engine name in mount() matches the registered name exactly
  3. Ensure the engine addon is installed and built into the parent app

Example fix

// app.js / instance initializer
// before
let engineInstance = parent.buildChildEngineInstance('chat');
// after
parent.register('engine:chat', ChatEngine); // or dependencies: { engines: { chat: { dependencies: services } } }
let engineInstance = parent.buildChildEngineInstance('chat');
Defensive patterns

Strategy: validation

Validate before calling

let ChildEngine = parent.lookup(`engine:${name}`);
if (!ChildEngine) throw new Error(`Engine '${name}' must be registered before mount`);

Type guard

function isRegisteredEngine(parent, name) { return Boolean(parent.lookup && parent.lookup(`engine:${name}`)); }

Try / catch

try { return parent.buildChildEngineInstance(name); } catch (e) { if (/not registered with its parent/.test(e.message)) { registerEngine(parent, name); return parent.buildChildEngineInstance(name); } throw e; }

Prevention

When it happens

Trigger: Calling mount('chat') in a route map (or buildChildEngineInstance directly) where the parent's EngineInstance was never told about the engine via engine.register('engine:chat', ChatEngine) or the engines option in buildInstance({ engines: ... }).

Common situations: Forgetting to add the engine to the parent's dependencies (ember-engines 'dependencies.engines' config); typo in the engine name; engine addon not installed/included in build.

Related errors


AI-assisted analysis of emberjs/ember.js@26f97246a8 (2026-09-01). Data as JSON: /api/errors/9f612a92c8938934. Report an issue: GitHub.