Uncaught Error: Unexpected directive ‘NgbTypeahead’ imported by the module ‘AppModule’. Please add a @NgModule annotation.

Bug description:

Followed the instructions on https://ng-bootstrap.github.io/#/getting-started
Installed ng-bootstrap:
npm install --save @ng-bootstrap/ng-bootstrap
Imported:
import { NgbTypeahead } from '@ng-bootstrap/ng-bootstrap';
Declared:
@NgModule({ declarations: [AppComponent], imports: [NgbTypeahead], providers: [], bootstrap: [AppComponent] }) export class AppModule { }

When running the app I get an error:
Uncaught Error: Unexpected directive ‘NgbTypeahead’ imported by the module ‘AppModule’. Please add a @NgModule annotation.

Versions of Angular, ng-bootstrap and Bootstrap:

Angular CLI: 7.3.5
Angular: 7.2.9
ng-bootstrap:4.1.0
Bootstrap:4.3.1

@NgModule annotation is there, not sure what is wrong! Thank you.

1 possible answer(s) on “Uncaught Error: Unexpected directive ‘NgbTypeahead’ imported by the module ‘AppModule’. Please add a @NgModule annotation.

  1. Please re-open, same documentation says

    It never says imports: [NgbTypeahead] (!) – I guess you’ve meant imports: [NgbTypeaheadModule]