[Fixed] Angular MomentDateTimeAdapter not building after angular 8 update


after updating my angular project I faced some probles due to the breaking changes. Now I have got an Problem with my MomentDateTimeAdapter. I’m using this one.(/ng-pick-datetime-moment).

My application is running perfectly in dev mode but as soon as i try to build productive (ng build --prod) Im getting this error:

Error during template compile of ‘MomentDateTimeAdapter’ Function
calls are not supported in decorators but ‘╔ÁmakeDecorator’ was called
in ‘Injectable’
‘Injectable’ calls ‘╔ÁmakeDecorator’.

I took every step described in the angular-update tutorial and updated all my dependencies. Does anyone know how to fix this?


I don’t exactly know why but I found this github entry.

By just adding: "paths": { "@angular/*": ["../node_modules/@angular/*"] }, into my tsconfig.app.json the build is working again.

Leave a Reply

(*) Required, Your email will not be published