'ng-select' is not a known element

I’m trying to use the select component for angular, but after I followed the instruction to configure the module this error is throw.


Uncaught Error: Template parse errors:
‘ng-select’ is not a known element:

  1. If ‘ng-select’ is an Angular component, then verify that it is part of this module.
  2. If ‘ng-select’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
    [ERROR ->] <ng-select placeholder="Select city"></ng-select>

How my app.module.ts is:

import { NgSelectModule } from '@ng-select/ng-select';
import { FormsModule } from '@angular/forms';

	declarations: [AppComponent],
	entryComponents: [...],
	imports: [..., NgSelectModule, FormsModule],
	providers: [
	bootstrap: [AppComponent]
export class AppModule {}

I tried to follow the solution for this post, which has the same error, but even if I do this I get this error. I also tried to import and add the NgSelectModule to my page module, but nothing changes. I even tried to add the module to app-routing.module.ts because I read someone mentioning that, but don’t worked either.

Additional information:

Ionic CLI                     : 5.4.16 
Ionic Framework               : @ionic/angular 4.11.7
@angular-devkit/build-angular : 0.801.2
@angular-devkit/schematics    : 8.1.3
@angular/cli                  : 8.1.3
@ionic/angular-toolkit        : 2.0.0
Cordova CLI                   : 9.0.0 (cordova-lib@9.0.1)

After simply restarting the development environment and recompiling everything again, it worked!