Function calls are not supported in decorators but 'FileTypeModule' was called
I don't have good news about this error message.
It is an issue with Angular 8.2.x and up that introduced limitations on how you can generate metadata for NgModule
that are side effects from recent updates to support Ivy.
export const fileTypeModule = FileTypeModule.forRoot();
The only way to fix this error is to modify the function forRoot()
from the module. There are strict limitations on what can be done inside that function.
You can not dynamically generate any providers, use arrow functions or conditionally create a NgModule
metadata.
This error has a long history now across multiple libraries:
https://github.com/ng-packagr/ng-packagr/issues/727
https://github.com/angular/angular/issues/23609
You can find my specific ways of fixing this problem here:
https://github.com/angular/angular/issues/23609#issuecomment-561615821
If you are not the author for the FileTypeModule
the only work around is to contact the author and request that they fix the problem, or you fork the library and make the fixes yourself.