I keep getting this error when I import FileUpload in app.module.ts #1168
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Something to do with ng2-fileil-upload not compatible with Angular Ivy.
does anyone know a way to work around this problem?
Error: node_modules/ng2-file-upload/file-upload/file-uploader.class.d.ts:38:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (ng2-file-upload) which declares FileUploader has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
38 export declare class FileUploader {
~~~~~~~~~~~~
Having a similar problem. Seems to be not compatible with Angular Ivy or Server Side Rendering.
This likely means that the library (ng2-file-upload) which declares FileUploadModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
angular 12 and ng2-file-upload ^1.4.0 has the same problem: 'FileUploadModule' does not appear to be an NgModule class.
npm uninstall and npm install it works correctly.