Search code examples
angularnebular

nebular issue in the modules of nebular like 'nb-card', 'nb-stripper'


I'm using nebular in angular, nb-card always not working, he always give me this. Any advice please ?

ERROR in src/app/kyc/documentverification/documentverification.component.html:2:1 - error NG8001: 'nb-card' is not a known element: 1. If 'nb-card' is an Angular component, then verify that it is part of this module. 2. If 'nb-card' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

2


src/app/kyc/documentverification/documentverification.component.ts:5:16
  5   templateUrl: './documentverification.component.html',
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Error occurs in the template of component DocumentverificationComponent.
src/app/kyc/documentverification/documentverification.component.html:3:5 - error NG8001: 'nb-card-header' is not a known element:
1. If 'nb-card-header' is an Angular component, then verify that it is part of this module.
2. If 'nb-card-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

3     <nb-card-header></nb-card-header>
    ~~~~~~~~~~~~~~~~

src/app/kyc/documentverification/documentverification.component.ts:5:16
  5   templateUrl: './documentverification.component.html',
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Error occurs in the template of component DocumentverificationComponent.
src/app/kyc/documentverification/documentverification.component.html:4:1 - error NG8001: 'nb-card-body' is not a known element:
1. If 'nb-card-body' is an Angular component, then verify that it is part of this module.
2. If 'nb-card-body' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

4 <nb-card-body>
~~~~~~~~~~~~~~

src/app/kyc/documentverification/documentverification.component.ts:5:16
  5   templateUrl: './documentverification.component.html',
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Error occurs in the template of component DocumentverificationComponent.

Solution

  • import NbCardModule in the module which has DocumentVerificationComponent

    import { NbCardModule } from 'nebular/themes'