I\'m getting following error when I build the Angular app using \"ng build --prod\". This is working when I build with Angular 4 and getting error with Angular 5. With Angul
I had exactly the same issue and can offer a workaround although not sure why this specific pipe is not being successfully picked up by the aot build:
Workaround
Copy the time-ago-pipe.ts from node_modules/time-ago-pipe and just copy this file into your own project.
Add it to your declarations in your module as normal and import this into your imports e.g:
import { TimeAgoPipe } from './_pipes/time-ago-pipe';
This will then compile successfully in AOT build and you can still use the pipe.