error -->The pipe 'filter' could not be found while using angular4
You must include FilterPipe in the declarations and exports of your PipesModule.
Angular 7/8 - nested routes
If you're using some nested routes and you're using the filter in child components, remove the filter from app.modules.ts and :
For custom filter
Import the filter in the declaration section of your child childmodule.module.ts
For ng2-search-filter
Import Ng2SearchPipeModule in the import section of your child childmodule.module.ts