ng2-file-upload: false positive
earshinov opened this issue · 12 comments
I have just discovered this project.
Do I understand correctly that its aim is to illustrate which packages are compatible with Ivy and which are not?
If so, where can I see a list of compatible and incompatible projects?
Initially I assumed that I can just look inside the projects folder. But ng2-file-upload is there although its last release (1.3.0) is incompatible with Ivy. Here is an error message from our project:
ERROR in ../node_modules/ng2-file-upload/file-upload/file-upload.module.d.ts:1:22 - error TS-996002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class
1 export declare class FileUploadModule {
~~~~~~~~~~~~~~~~
In ng2-file-upload-ngcc, FileUploadModule
is not even imported into AppModule
. Perhaps that's why you did not discover this problem.
valor-software/ng2-file-upload#1092 - the issue regarding compatibility with Angular 8 and Ivy
@earshinov the ultimate goal of the project is to verify compatibility with Ivy. Currently, we verify partially only build-time compatibility.
Would you open a PR, importing the FileUploadModule
in AppModule
so we can get the build-time failure?
Thanks!
There you go: https://github.com/mgechev/ngcc-validation/pull/289
ERROR in ../../node_modules/ng2-file-upload/file-upload/file-upload.module.d.ts:1:22 - error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
@earshinov is this issue still relevant? Can you reproduce it with the latest release?
@earshinov is this issue still relevant? Can you reproduce it with the latest release?
Yes, the issue is still there.
$ ng build ng2-file-upload-ngcc
0% compiling
Compiling @angular/core : module as esm5
Compiling @angular/common : module as esm5
Compiling @angular/platform-browser : module as esm5
Compiling @angular/platform-browser-dynamic : module as esm5
Compiling ng2-file-upload : module as esm5
chunk {main} main.js, main.js.map (main) 654 bytes [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 709 bytes [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 450 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 10.1 kB [initial] [rendered]
Date: 2019-10-12T14:47:54.550Z - Hash: f05777a33fd1635da221 - Time: 27451ms
ERROR in ../../node_modules/ng2-file-upload/file-upload/file-upload.module.d.ts:1:22 - error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class
1 export declare class FileUploadModule {
~~~~~~~~~~~~~~~~
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ngcc-validation already uses the latest version of ng2-file-upload npm package, 1.3.0.
They are now looking for a maintainer, so I don't think we will have Ivy compatibility soon.
My PR into ng2-file-upload adding support for Ivy is still open.
This seems to have been fixed in the latest 1.4.0 release (thx @earshinov).
You can see it passing here, which is a build for PR #451.
Not working for latest version (1.4.0) with Angular 9.
Hello same with Angular 9.1
Appears in the NgModule.exports of CoreModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class.
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 upd
ate if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
I am going to close this issue, because the tests in this repo are passing with ng2-file-upload
(see #284 (comment)). If it is failing for you, it is likely something related to your specific setup, but there is not much we can do without a reproduction of the issue (e.g. a repo we can checkout or exact commands to run to reproduce the error).
If it still failing for you (which based on your comments it is 😁), please open a new issue on angular/angular (where the ngcc
code lives) with all the necessary info (including some form of (minimal 🙏) reproduction). Thank you!
Angular 9.1 I stack with this error:
ERROR in node_modules/ngx-uploader/lib/ngx-uploader.module.d.ts:1: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 (ngx-uploader) which declares NgxUploaderModule 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.
1 export declare class NgxUploaderModule {
~~~~~~~~~~~~~~~~~