roiperlman / ngx-document-scanner

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

Multiple issues with Angular version >= 8 #10

Closed kvnngn closed 3 years ago

kvnngn commented 4 years ago

Hello,

There are multiple problems:

  1. ERROR in ./node_modules/ngx-document-scanner/src/lib/ngx-document-scanner.module.ts Module build failed (from ./node_modules/@ngtools/webpack/src/index.js): Error: /Users/knguyen/rendu/gpharma/node_modules/ngx-document-scanner/src/lib/ngx-document-scanner.module.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property. The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. **Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).** at AngularCompilerPlugin.getCompiledFile (/Users/knguyen/rendu/gpharma/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:913:23) at /Users/knguyen/rendu/gpharma/node_modules/@ngtools/webpack/src/loader.js:41:31 at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:97:5)

  2. The code is not coded with Angular 8 update, ViewChild need two parameters now. I had to modify ' @ViewChild('outline', {static: true}) canvas;' in ngx-shape-outline.component.ts and @ViewChild('PreviewCanvas', {read: ElementRef, static: true}) private previewCanvas: ElementRef; in ngx-doc-scanner.component.ts

kvnngn commented 4 years ago

[UPDATE]

It's rather '@ViewChild('outline', {static: false}) canvas;' in ngx-shape-outline.component.ts