nebular icon indicating copy to clipboard operation
nebular copied to clipboard

Cannot use @angular/cdk with Nebular

Open rashisf opened this issue 10 months ago • 0 comments

Issue type

  • [x] 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)

rashisf avatar Jan 24 '25 14:01 rashisf