Skip to content

hub: importing /devframe in an Angular 20 server bundle fails on createRequire #427

Open

Description

@erkamyaman

Found in the 1.0.0 install matrix.

What happens

The Express hub path on Angular 20.x is fixed: the hub is now loaded from the package at runtime. But custom hosts that import @pangular-inspector/devtools/devframe into an Angular 20 server bundle still fail during route extraction:

Identifier 'createRequire' has already been declared

Angular 20 adds a top-level import { createRequire } from 'node:module' banner. devframe's own files declare the same name. Angular 21 and 22 are fine, because they alias the banner import.

Possible fixes (upstream)

  • devframe emits import { createRequire as … } with an alias, or uses process.getBuiltinModule.
  • Angular backports its __ngCreateRequire alias to 20.x.

Until then, the custom host docs could note that on Angular 20 the devframe import has to be loaded at runtime (await import(...)) rather than bundled.

Activity

  1. added
    bugSomething is broken or shows wrong data
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or shows wrong data

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions