roiperlman / ngx-document-scanner

Angular 2+ component for cropping and enhancing images of documents
MIT License
29 stars 33 forks source link

Not Work with Angular 13 #47

Open joussad opened 2 years ago

joussad commented 2 years ago

Hello,

I faced diffculties when i import the NgxDocumentScannerModule in my Angular app:

- @angular/flex-layout/flex [es2015/esm2015] (https://github.com/angular/flex-layout.git)
file:///C:/Users/oussad-j/IdeaProjects/perso/home-budget/node_modules/@angular/compiler-cli/bundles/ngcc/index.js:14690
    throw new Error(createErrorMessage(fs5, task, message));
          ^

Error: Failed to compile entry-point @angular/flex-layout/flex (`es2015` as esm2015) due to compilation errors:
node_modules/ngx-document-scanner/node_modules/@angular/flex-layout/esm2015/flex.js:180:7 - error NG2006: The directive DefaultLayoutDirective inherits its constructor from LayoutDirective, but the latter does not have an Angular
 decorator of its own. Dependency injection will not be able to resolve the parameters of LayoutDirective's constructor. Either add a @Directive decorator to LayoutDirective, or add an explicit constructor to DefaultLayoutDirecti
ve.

It seems the flex-layout package is older et need to be updated to v9:

"dependencies": {
    "@angular/flex-layout": ">=7.0.0-beta.19",
}