w11k / angular-sticky-things

Sticky Directive for Angular 2+

Home Page:https://w11k.github.io/angular-sticky-things

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: could not be resolved to an NgModule class

jordankkk opened this issue · comments

ERROR in node_modules/@w11k/angular-sticky-things/lib/angular-sticky-things.module.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class.

This likely means that the library (@w11k/angular-sticky-things) which declares AngularStickyThingsModule 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 version: 10.0.7

tested @w11k/angular-sticky-things with v1.3.0 and v1.2.5

I have generated a new Angular project and installed our library. I get the following error messages:

Warning: Unable to fully load /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/sticky-thing.directive.d.ts for source-map flattening: Circular source file mapping dependency: /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/sticky-thing.directive.d.ts.map -> /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/sticky-thing.directive.d.ts.map
Warning: Unable to fully load /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/angular-sticky-things.module.d.ts for source-map flattening: Circular source file mapping dependency: /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/angular-sticky-things.module.d.ts.map -> /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/angular-sticky-things.module.d.ts.map
Warning: Unable to fully load /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/w11k-angular-sticky-things.d.ts for source-map flattening: Circular source file mapping dependency: /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/w11k-angular-sticky-things.d.ts.map -> /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/w11k-angular-sticky-things.d.ts.map
Error: Tried to write /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/sticky-thing.directive.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/sticky-thing.directive.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.
Error: Tried to write /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/angular-sticky-things.module.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/lib/angular-sticky-things.module.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.
Error: Tried to write /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/w11k-angular-sticky-things.d.ts.__ivy_ngcc_bak with an ngcc back up file but it already exists so not writing, nor backing up, /home/sengmann/Projekte/tmp/stick-demo/node_modules/@w11k/angular-sticky-things/w11k-angular-sticky-things.d.ts.
This error may be because two or more entry-points overlap and ngcc has been asked to process some files more than once.
You should check other entry-points in this package and set up a config to ignore any that you are not using.
Compiling @angular/router/testing : es2015 as esm2015

I will investigate further.

Apparently our Gitlab CI task has done something wrong. I published version 1.3.1. This should hopefully resolve the problem. We have to clean the dist folder and the npm folder, then use build:lib to clean build the library. Then finally we can publish to npm.

Please let me know if this fixes your problem too

@sengmann Thank you for the quick fix! For me it solves this issue.

Thanks @sengmann! fixed now : )