Two common mistakes done by people who are using ng-bootstrap for the first time:
- Include both
NgbModule and individual components and get that duplication error.
- Miss "Module" suffix while importing most of components
(e.g. import { NgbTabset } from ... instead of import { NgbTabsetModule } from ...)
So as the answer to your question just remove the NgbModule if you've imported that and import NgbTabsetModule instead.
Just like this:
// Remove this line -> import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { NgbTabsetModule } from '@ng-bootstrap/ng-bootstrap';
//...
@NgModule({
imports: [
// ...
NgbTabsetModule,
],
declarations: [YourComponent]
})
export class YourComponent {}
P.S. Also there is no need to provide full path while importing the component as is mentioned in other answer(s). Importing from '@ng-bootstrap/ng-bootstrap' works fine.