Skip to content

Cannot use @angular/cdk with Nebular #3276

Open
@rashisf

Description

@rashisf

Issue type

  • Bug
  • Feature request

Versions

Nebular v14.0.2
Angular v18

Issue Description

I have NbLayoutModule & many other Nebular Modules in ThemeModule that is imported at the root. I have a custom standalone component that is making use of @angular/cdk directives . The Nebular Components are not involved anywhere in that component, however I get the following error and the overlay does not open.

core.mjs:7195 ERROR Error: [NbOverlayContainerAdapter]: Layout not found.
  When using Nebular '<nb-layout>' is required and should wrap other nebular components.
    at throwLayoutNotFoundError (nebular-theme.mjs:3537:9)
    at _NbOverlayContainerAdapter.checkContainer (nebular-theme.mjs:3564:7)
    at _NbOverlayContainerAdapter._createContainer (nebular-theme.mjs:3556:10)
    at _NbOverlayContainerAdapter.getContainerElement (overlay.mjs:751:12)
    at FlexibleConnectedPositionStrategy.apply (overlay.mjs:1374:50)
    at OverlayRef.updatePosition (overlay.mjs:1043:30)
    at _afterNextRenderRef.afterNextRender.injector (overlay.mjs:914:14)
    at core.mjs:19014:93
    at _ZoneDelegate.invoke (zone.js:369:28)
    at ZoneImpl.run (zone.js:111:43)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions